ERROR 2002 (HY000): Can’t connect to local MySQL server through socket "/data/mysq/mysql.sock’ (2)
数据库未启动或者数据库端口被防火墙拦截
启动数据库或者防火墙开放数据库监听端口
ERROR 1045 (28000): Access denied for user 'root @'localhost (using password:NO)
密码不正确或者没有权限访问
修改my.cnf主配置文件,在[mysqld] 下添加skip-grant tables
在使用远程连接数据库时偶尔会发生远程连接数据库很慢的问题
DNS解析慢、客户端连接过多
Can’t open file: ‘xxX_ forums.MYI’. (errmno: 145)
ERROR 1129 (HY000): Host xxx.oxx.xxx.xxx is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’
超出最大连接错误数量限制
Too many connections
连接数超出MySQL的最大连接限制
Warning: World-writable config file /etc/my.cnf is ignored ERROR! MySQL is running but PID file could not be found
MySQL的配置文件/etc/my.cn权限问题
chmod 644 /etc/my.cnf
InnoDB: Error: page 14178 log sequence number 29455369832
InnoDB: is in the future! Current system log sequence number 29455369832
innodb数据文件损坏
修改my.cnf配置文件(innodb_ force_recovery=4)
启动数据库后备份数据文件
利用备份文件恢复数据
从库的Slave_ I0_ Running为NO
The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense;please check the manual before using it).
主库和从库的server-id值一样
从库的Slave_ I0_ Running为NO
主键冲突或者主库删除或更新数据,从库内找不到记录,数据被修改导致
Error initializing relay log position: 1/0 error reading the header from the binary log
从库的中继日志relay-bin损坏
手工修复,重新找到同步的binlog和pos点,然后重新同步即可
mysql> CHANGE MASTER TO MASTER_LOG_FILE=‘mysql-bin.xx’,MASTER_LOG_POS=xxx;