`

mysql too many connections & MySQL is running but PID file is not found

 
阅读更多

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)

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics