码迷,mamicode.com
首页 > 数据库 > 详细

mysql source 恢复 sql数据time_zone报错 已解决

时间:2017-08-08 19:49:11      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:接受   comm   配置   log   prevent   参数   ref   one   sys   

报了一些变量的错误,类似于"time_zone" 等错误

技术分享

解决:

[root@iz8vbilqy0q9v8tds55bqzz conf.d]# vi /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
max_allowed_packet = 1024M   #新增这项解决。

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

  

原因:

MySQL根据配置文件会限制server接受的数据包大小。技术分享

有时候大的插入和更新会被max_allowed_packet 参数限制掉,导致失败。  改大些就应该没问题了。。

 

mysql source 恢复 sql数据time_zone报错 已解决

标签:接受   comm   配置   log   prevent   参数   ref   one   sys   

原文地址:http://www.cnblogs.com/liuquan/p/7308174.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!