解决ERROR 1231 (42000): Variable 'time_zone' can't

发布时间:2020-07-31 09:51:25 作者:莲池管俊涛
来源:网络 阅读:6567


解决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


推荐阅读:
  1. error code指的是什么意思
  2. java.sql.SQLRecoverableException: IO Error: Socket read timed out 排查历程

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

error 1231 42000

上一篇:SpringSecurity入门到实战

下一篇:Spring IOC怎么装配Bean

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》