加入收藏 | 设为首页 | 会员中心 | 我要投稿 大连站长网 (https://www.0411zz.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

解决ERROR 1231 42000 Variable time_zone can t

发布时间:2022-07-05 06:02:40 所属栏目:MySql教程 来源:互联网
导读:解决mysql 数据库在迁移或还原数据过程中出现的如下报错: ERROR 1231 (42000): Variable time_zone cant be set to the value of NULL ERROR 1231 (42000): Variable sql_mode cant be set to the value of NULL ERROR 1231 (42000): Variable foreign_ke
  解决mysql 数据库在迁移或还原数据过程中出现的如下报错:
 
  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'
  解决办法:
 
  修改mysql配置文件:max_allowed_packet=1024M
 
  重启mysql:
 
  # systemctl  restart mysql.service

(编辑:大连站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!