How to permanently set sql_mode in mySQL ?
To permanently set a variable in MySQL, the best option is to add the variable in the configuration file my.cnf
usually located in /etc/mysql/
. Edit the file and add the following line at the end:
[mysqld]
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Then, restart MySQL:
sudo service mysql restart
To permanently set a variable in MySQL, the best option is to add the variable in the configuration file my.cnf
usually located in /etc/mysql/
. Edit the file and add the following line at the end:
[mysqld]
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Then, restart MySQL:
sudo service mysql restart
To permanently set a variable in MySQL, the best option is to add the variable in the configuration file my.cnf
. Edit the file and add the following line at the end:
[mysqld]
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Then, restart MySQL:
sudo service mysql restart
To permanently set a variable in MySQL, the best option is to add the variable in the configuration file my.cnf
. Edit the file and add the following line at the end:
[mysqld]
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
To permanently set a variable in MySQL, the best option is to add the variable in the configuration file my.cnf
.
# | ID | Query | URL | Count |
---|