Home » Categories » MySQL » Configuration | ||||
How can I disable MySQL Strict Mode? |
||||
Article Number: 38 | Rating: Unrated | Last Updated: Mon, Sep 28, 2020 at 1:58 AM
|
||||
This is enabled by default, but you can disable it in one of a couple ways. First, verify which mode(s) MYSQL is running with: $ mysql -u root -p -e "SHOWVARIABLESLIKE'sql_mode';"
1. To Disable Strict Mode via SQL:You can disable strict mode on your MySQL server by running the following command on your Linode's command line:
You can set other values for sql_mode as well. See sysvar sql_mode in the MySQL Documentation for a list. Then, you can verify that the mode is set by running the following:
or 2. Disable Strict Mode via my.cnf:Disable it by setting your own SQL_MODE in the my.cnf file, then restart MySQL. The my.cnf file can be found in one of a few locations (depending on which distribution you're using). The most common locations are /etc/my.cnf and /etc/mysql/my.cnf. Inside my.cnf, look for a heading like
You can change the value of sql_mode to NO_ENGINE_SUBSTITUTION to completely disable strict mode, but you may want to look up each mode that is configured before disabling it. If sql_mode isn't set, you can add it under the https://www.linode.com/community/questions/17070/how-can-i-disable-mysql-strict-mode
|
||||
| ||||
Attachments
![]()
There are no attachments for this article.
| ||||
Comments ![]() There are no comments for this article. Be the first to post a comment. | ||||
How to enable explicit_defaults_for_timestamp?
Viewed 1030 times since Sun, Sep 27, 2020
How do I disable Strict Mode in MySQL?
Viewed 665 times since Mon, Sep 28, 2020
MySQL-PHP get and echo NOW() value?
Viewed 624 times since Mon, Sep 28, 2020
Your Password does not satisfy the Current Policy Requirements
Viewed 593 times since Sat, Sep 19, 2020
SHOW VARIABLES Statement
Viewed 654 times since Sun, Sep 27, 2020
How to change the MySQL root account password on CentOS7?
Viewed 551 times since Sat, Sep 5, 2020
[Warning] ’NO_AUTO_CREATE_USER’ sql mode was not set.
Viewed 1998 times since Sun, Sep 27, 2020
|