MySQL无法启动的解决办法
MySQL无法启动的解决办法
MySQL无法启动
在停止mysql之后,执行了一些操作(如修改主机名),重新启动mysql,发现起不来。
[root@www~]$servicemysqlstart StartingMySQL..^[[A..................................................................................................ERROR!TheserverquitwithoutupdatingPIDfile(/disk/mysql/www.pid). [root@www~]$servicemysqlstop ERROR!MySQLserverPIDfilecouldnotbefound! [root@www~]$servicemysqlstop ERROR!MySQLserverPIDfilecouldnotbefound! [root@www~]$servicemysqlstart StartingMySQL.................. 还是老样子,只好Ctr+C掉。 [root@www~]$
实在是启动不了,看一下日志:/disk/mysql/www.err
12060809:56:17mysqld_safeStartingmysqlddaemonwithdatabasesfrom/disk/mysql 1206089:56:17[Note]Plugin'FEDERATED'isdisabled. 1206089:56:17InnoDB:TheInnoDBmemoryheapisdisabled 1206089:56:17InnoDB:Mutexesandrw_locksuseInnoDB'sownimplementation 1206089:56:17InnoDB:Compressedtablesusezlib1.2.3 1206089:56:17InnoDB:UsingLinuxnativeAIO 1206089:56:17InnoDB:Initializingbufferpool,size=128.0M 1206089:56:17InnoDB:Completedinitializationofbufferpool InnoDB:Unabletolock./ibdata1,error:11 InnoDB:Checkthatyoudonotalreadyhaveanothermysqldprocess InnoDB:usingthesameInnoDBdataorlogfiles. 1206089:56:17InnoDB:Retryingtolockthefirstdatafile InnoDB:Unabletolock./ibdata1,error:11 InnoDB:Checkthatyoudonotalreadyhaveanothermysqldprocess InnoDB:usingthesameInnoDBdataorlogfiles. InnoDB:Unabletolock./ibdata1,error:11 InnoDB:Checkthatyoudonotalreadyhaveanothermysqldprocess InnoDB:usingthesameInnoDBdataorlogfiles. InnoDB:Unabletolock./ibdata1,error:11 ...
好像是原来的mysqld并没有停下来。
强制终止mysqld
[root@www~]$ps-ef|grepmysql root476910Jun06?00:00:00/bin/sh/usr/bin/mysqld_safe--datadir=/disk/mysql--pid-file=/disk/mysql/localhost.pid mysql487447690Jun06?00:04:04/usr/sbin/mysqld--basedir=/usr--datadir=/disk/mysql--plugin-dir=/usr/lib/mysql/plugin--user=mysql--log-error=/disk/mysql/localhost.err--pid-file=/disk/mysql/localhost.pid--socket=/disk/mysql/mysql.sock root179471009:56pts/100:00:00/bin/sh/usr/bin/mysqld_safe--datadir=/disk/mysql--pid-file=/disk/mysql/www.pid mysql1805217947009:56pts/100:00:00/usr/sbin/mysqld--basedir=/usr--datadir=/disk/mysql--plugin-dir=/usr/lib/mysql/plugin--user=mysql--log-error=/disk/mysql/www.err--pid-file=/disk/mysql/www.pid--socket=/disk/mysql/mysql.sock root1809917514009:56pts/100:00:00grepmysql [root@www~]$killallmysqld [root@www~]$killallmysqld [root@www~]$ps-ef|grepmysql root1811617514009:57pts/100:00:00grepmysql [root@www~]$
启动mysqld,现在执行多次启动命令都没有问题。
[root@www~]$servicemysqlstart StartingMySQL.SUCCESS! [root@www~]$ [root@www~]$ [root@www~]$ [root@www~]$ [root@www~]$servicemysqlstart StartingMySQLSUCCESS! [root@www~]$
前面www.err文件中显示的error:11到底是什么,看下:
[root@www~]$perror11 OSerrorcode11:Resourcetemporarilyunavailable [root@www~]$ [root@www~]$
如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!