在 mysql 中设置全局 sql_mode [英] setting global sql_mode in mysql

查看:46
本文介绍了在 mysql 中设置全局 sql_mode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在 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"

这篇关于在 mysql 中设置全局 sql_mode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆