错误#1238更新DateTime格式变量时
我正在尝试更改 mysql 全局变量datetime_format
使用Zulu Time(%y-%m-%m-%dt%H:%i:%i:%sz < /代码>)在我的应用程序中。
我以前从来没有任何问题在Localhost上运行此命令,并且在没有收到此错误的情况下找不到方法:
##1238-变量'dateTime_format'是读取变量
我可以访问my.cnf
file,但这不允许我为启动设置任何默认变量。
在启动 mysql 时,我是否可以绕过此方法和/或设置默认变量,或者我必须找到替代的本地服务器?
I'm attempting to change the MySQL global variable datetime_format
to use zulu time (%Y-%m-%dT%H:%i:%sZ
) inside my application.
I've never had any issues running this command on localhost before and I cannot find a way to do it without receiving this error:
#1238 - Variable 'datetime_format' is a read only variable
On MAMP Pro I have access to the my.cnf
file, but this doesn't let me set any default variables for startup.
Is there a way I can bypass this and/or set default variables when starting up MySQL or will I have to find an alternative local server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要设置DateTime格式,您需要在my.cnf文件中添加它。
在MAMP中,您需要遵循以下步骤:
To set datetime format, you need to add it inside your my.cnf file.
In MAMP you need to follow below steps: