My MySQL server's sql_mode
setting is set to STRICT
. I want to change it to TRADITIONAL
for a particular application I'm developing. However it's not possible for me to do this at the server level.
Is it possible to change the sql_mode
setting at runtime from my PHP scripts?
How would one fix this? if you have access to the sed utility, try this command: sed -i 's/NO_AUTO_CREATE_USER//' mysqldump. sql to remove the "NO_AUTO_CREATE_USER" text from your dump file, and replace it with nothing. @pbnelson you should grep for NO_AUTO_CREATE_USER before you do this.
SQL mode (sql_mode) is a MySQL system variable. By means of this varriable the MySQL Server SQL mode is controlled. Many operational characteristics of MySQL Server can be configured by setting the SQL mode.
Hmm this should work
// connect to mysql and call the first query
mysqli_query($conn, "SET SESSION sql_mode = 'TRADITIONAL'");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With