Mysql 可变时区可以';不能设置为空值
我有一个全新的WampServer设置,当我对新数据库使用source命令时:Mysql 可变时区可以';不能设置为空值,mysql,apache,wamp,wampserver,Mysql,Apache,Wamp,Wampserver,我有一个全新的WampServer设置,当我对新数据库使用source命令时: source path/to/database.sql 这一切似乎都被认为是错误的 Query OK 但我在最后得到了这组错误: ERROR 1231 (42000): Variable ‘time_zone’ can’t be set to the value of ‘NULL’ ERROR 1231 (42000): Variable ‘sql_mode’ can’t be set to the value
source path/to/database.sql
这一切似乎都被认为是错误的
Query OK
但我在最后得到了这组错误:
ERROR 1231 (42000): Variable ‘time_zone’ can’t be set to the value of ‘NULL’
ERROR 1231 (42000): Variable ‘sql_mode’ can’t be set to the value of ‘NULL’
ERROR 1231 (42000): Variable ‘foreign_key_checks’ can’t be set to the value of ‘NULL’
ERROR 1231 (42000): Variable ‘unique_checks’ can’t be set to the value of ‘NULL’
ERROR 1231 (42000): Variable ‘character_set_client’ can’t be set to the value of ‘NULL’
Query OK, 0 rows affected (0.00 sec)
ERROR 1231 (42000): Variable ‘collation_connection’ can’t be set to the value of ‘NULL’
ERROR 1231 (42000): Variable ‘sql_notes’ can’t be set to the value of ‘NULL’
我以前设置过WAMP环境,没有这些错误。如果您运行的是64位WAMPServer,则64位版本中有一个小错误 编辑
my.ini
文件并将节标题从
[wampmysqld]
到
标题必须与WAMPServer安装MYSQL的服务名称相匹配,在64位版本中,MYSQL服务称为
wampmysqld64
,除非您可以从有问题的数据库转储中粘贴一些代码,否则这是一个服务器软件问题,超出了堆栈溢出的范围。请记住,数据库转储通常只是纯文本SQL,即使是压缩的,所以打开它们并搜索时区之类的内容应该很容易。当然,我会添加代码,但这不是数据库转储,我使用源代码命令加载了数据库,不管你想叫它什么,如果可以使用source
命令将其导入数据库,它仍然是一个数据库转储。例如,与时区相关的文件内容是什么?您使用的是32位还是64位WAMPServer?
[wampmysqld64]