在 mysql 中设置全局 sql_mode
2021-11-20 00:00:00
mysql
我试图在 mysql 中设置 sql_mode 但它抛出了一个错误.
I am trying to set sql_mode in mysql but it throws an error.
命令:
set global sql_mode='NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLE','NO_AUTO_CREATE_USER','NO_ENGINE_SUBSTITUTION'
这不是设置多种模式的正确方法吗?设置会话和全局模式有什么好处?哪个是首选?我有不同的用户尝试使用不同的 UNC 值更新数据库,而不是将会话模式设置为NO_BACKSLASH_ESCAPE",但我认为为此设置全局模式是有意义的.这有意义吗?
Is this not the proper way to set multiple modes? What are the advantages of setting session and global modes? which is preferred? I have different users trying to update the database with different UNC values and instead of setting the session mode to 'NO_BACKSLASH_ESCAPES', I though it would make sense to set a global mode for this. Does this make sense?
请告诉我.
谢谢.
推荐答案
我解决了.
正确的模式是:
set global sql_mode="NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLE,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
相关文章