1. Mysql 提示 too many connections
解决方法参见:http://dutianzhao.iteye.com/blog/2075293
2. 设置了mysql最大连接数之后仍然出现 too many connections
解决方法: service mysql restart 或者 /etc/init.d/mysql restart
3. Mysql 提示 too many connections并且无法重启
解决方法:ps aux|grep mysql
Kill -9 {进程ID}
然后:service mysql start
如果一直无法启动:service mysql status
提示:MySQL is running but PID file is not found
查看mysql日志:cd /var/lib/mysql (/var/lib/mysql 是mysql的datadir)
扫描二维码关注公众号,回复:
1197891 查看本文章
tail –f localhost.localdomain.err
如果提示空间不足之类的就将以mysql-bin 开头的文件先备份,然后删除;
cd /usr/bin
myisamchk –c –r /var/lib/mysql/{数据库名称}/*.MYI
然后启动mysql
4. Myisamchk 是在mysql没有启动时修复表
Mysqlcheck 可以在mysql运行时修复表,具体参见http://dutianzhao.iteye.com/blog/2086641