查看sql_mode:
设置sql_mode:
SET sql_mode = 'NO_UNSIGNED_SUBTRACTION,NO_ENGINE_SUBSTITUTION';
再次查看:
退出,重启MySQL,在进入查看设置的又回去了
这是怎么回事?
PHP中文网2017-04-17 14:44:47
What you set through the client is at the session level. Of course it will be invalid after restarting. If you want to set it at the global level, you need to modify it in the mysql configuration document
迷茫2017-04-17 14:44:47
1. SET global sql_mode = 'NO_UNSIGNED_SUBTRACTION,NO_ENGINE_SUBSTITUTION';
2. Add configuration under [mysqld] of my.cnf: sql_mode = NO_UNSIGNED_SUBTRACTION,NO_ENGINE_SUBSTITUTION