shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

how can i set sql-mode through a conf file

Open panqizhen opened this issue 1 year ago • 4 comments

Question

I am using shardingsphere-proxy with php and I need to set mysql sql-mode. now i can only set sql-mode after start shardingsphere-proxy, but it will be invalid after restart. I did not find any method in the docs and i can not understand the source code. How can i set sql-mode durable image

For English only, other languages will not accept.

Before asking a question, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will close it.

panqizhen avatar Jul 21 '22 08:07 panqizhen

Just set it in your database

terrymanu avatar Jul 25 '22 04:07 terrymanu

Just set it in your database

But i can not remove STRICT_TRANS_TABLES

Snipaste_2022-07-28_19-58-57

panqizhen avatar Jul 28 '22 12:07 panqizhen

Just set it in your database

image

hwo can i change this sql_mode and remove "STRICT_TRANS_TABLES"

panqizhen avatar Aug 10 '22 09:08 panqizhen

Try setting jdbcCompliantTruncation=false in JDBC URL.

Such as

jdbc:mysql://127.0.0.1:3306/ds?jdbcCompliantTruncation=false

TeslaCN avatar Aug 11 '22 08:08 TeslaCN

Try setting jdbcCompliantTruncation=false in JDBC URL.

Such as

jdbc:mysql://127.0.0.1:3306/ds?jdbcCompliantTruncation=false

Thank you very much! It works

panqizhen avatar Aug 12 '22 00:08 panqizhen