varchar(10)
Hi, for a synchronization application between 2 sites / databases we need to insert more than 10 characters. Out of the classical operation of the base inserts the first 10 characters.
MySQL :: MySQL 5.7 Reference Manual :: 6.1.8 Server SQL Modes indique qu'il faut modifier le fichier de config de mysql, But every time you restart mysql it gets back up. We need this value to change.
We do not know where the server takes this value or how to change it permanently.
Thank you for your help.
-
Hello, You can add a line like this to your /etc/my.cnf file and then restart the MySQL service: sql_mode="TRADITIONAL"
Thank you.0 -
Hi and thank you for your reply. If I add that, it will remove the limit of 10 carcat"res? And especially make it final even after a server restart? 0 -
Hello, Adding the value to the /etc/my.cnf file will make the change permanent. However, whether or not that change addresses your issue depends on your specific script. Here's a similar thread you may find helpful: MySQL won't let me insert more than 10 digits using datatype INT Thank you. 0 -
Hi and thank you for your answers. No, they are all false leads. To understand what it is about MySQL :: MySQL 5.7 Reference Manual :: 6.1.8 Server SQL Modes You have to do what is described here (for example) How do I disable MySQL strict mode on the server? On our server, by doing this, it still has the value STRICT_TRANS_TABLE ... So it means that it has this value somewhere by default. We should know where. To indicate 'TRADITIONAL' is to put back the value that emboldens us. 0 -
On our server, by doing this, it still has the value STRICT_TRANS_TABLE ... So it means that it has this value somewhere by default. We should know where.
Hello, Thank you for explaining the issue further. You may also want to verify that /usr/my.cnf does not exist on the system, as it will overwrite your /etc/my.cnf file settings. If it does exist, try disabling this file and restarting MySQL:mv /usr/my.cnf /usr/my.cnf.backup1 /scripts/restartsrv_mysql
Thank you.0 -
Hello. We're trying. It looks to be good. Thanks for your advices. We will return to you if need be. 0
Please sign in to leave a comment.
Comments
6 comments