Home  >  Article  >  Database  >  mysql日常问题记录_MySQL

mysql日常问题记录_MySQL

WBOY
WBOYOriginal
2016-06-01 13:46:001090browse

bitsCN.com

1、修改mysql日志路径
vim /etc/my.cnf
log-bin = mysql-bin
修改为:
log-bin = /$PATH/mysql-bin
修改完毕后,保存退出。
修改mysql-bin.index文件,修改其中现有日志的路径。
默认为:./mysql-bin.....
修改为:/$PATH/mysql-bin....
全部替换后即可重启mysql服务,否则会重启出错。
2、问题:Error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 113'  errno: 2013  retry-time: 30  retries: 86400
解决办法:在 my.cnf 里面的 [mysqld] 段增加一个启动参数
          skip-name-resolve
保存重启即可。 skip-name-resolve 选项可以禁用dns解析。
3、问题:Error reading packet from server: Access denied; you need the REPLICATION SLAVE privilege for this operation ( server_errno=1227)
解决办法:主服务器给的复制权限不够,重新赋予权限。
       grant replication slave on *.* to 'replication'@'ip地址' identified by '密码';
       flush privileges;
远程重新测试即正常。
后续添加中。。
本文出自 “我的运维之路” 博客

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn