MySQL无法启动的解决办法示例分享

这篇文章主要介绍了mysql无法启动的解决办法的相关资料,希望通过本文大家能解决数据库不能启动的问题,需要的朋友可以参考下

MySQL无法启动的解决办法

MySQL无法启动

在停止mysql之后,执行了一些操作(如修改主机名),重新启动 mysql,发现起不来。 

[root@www ~]$ service mysql start Starting MySQL..^[[A.................................................................................................. ERROR! The server quit without updating PID file (/disk/mysql/www.pid).[root@www ~]$ service mysql stop  ERROR! MySQL server PID file could not be found![root@www ~]$ service mysql stop  ERROR! MySQL server PID file could not be found![root@www ~]$ service mysql start Starting MySQL..................还是老样子,只好 Ctr+C 掉。[root@www ~]$

登录后复制

实在是启动不了,看一下日志:/disk/mysql/www.err 

120608 09:56:17 mysqld_safe Starting mysqld daemon with databases from /disk/mysql120608 9:56:17 [Note] Plugin 'FEDERATED' is disabled.120608 9:56:17 InnoDB: The InnoDB memory heap is disabled120608 9:56:17 InnoDB: Mutexes and rw_locks use InnoDB's own implementation120608 9:56:17 InnoDB: Compressed tables use zlib 1.2.3120608 9:56:17 InnoDB: Using Linux native AIO120608 9:56:17 InnoDB: Initializing buffer pool, size = 128.0M120608 9:56:17 InnoDB: Completed initialization of buffer poolInnoDB: Unable to lock ./ibdata1, error: 11InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.120608 9:56:17 InnoDB: Retrying to lock the first data fileInnoDB: Unable to lock ./ibdata1, error: 11InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.InnoDB: Unable to lock ./ibdata1, error: 11InnoDB: Check that you do not already have another mysqld processInnoDB: using the same InnoDB data or log files.InnoDB: Unable to lock ./ibdata1, error: 11...

登录后复制

 好像是原来的 mysqld 并没有停下来。

强制终止 mysqld

[root@www ~]$ ps -ef|grep mysql root   4769   1 0 Jun06 ?    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/disk/mysql --pid-file=/disk/mysql/localhost.pidmysql   4874 4769 0 Jun06 ?    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.sockroot   17947   1 0 09:56 pts/1  00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/disk/mysql --pid-file=/disk/mysql/www.pidmysql  18052 17947 0 09:56 pts/1  00: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.sockroot   18099 17514 0 09:56 pts/1  00:00:00 grep mysql[root@www ~]$ killall mysqld [root@www ~]$ killall mysqld [root@www ~]$ ps -ef|grep mysql root   18116 17514 0 09:57 pts/1  00:00:00 grep mysql[root@www ~]$

登录后复制

 启动 mysqld ,现在执行多次启动命令都没有问题。

[root@www ~]$ service mysql start Starting MySQL. SUCCESS! [root@www ~]$ [root@www ~]$ [root@www ~]$ [root@www ~]$ [root@www ~]$ service mysql start Starting MySQL SUCCESS! [root@www ~]$

登录后复制

前面 www.err 文件中显示的 error: 11 到底是什么,看下:

[root@www ~]$ perror 11 OS error code 11: Resource temporarily unavailable[root@www ~]$ [root@www ~]$

登录后复制

以上就是MySQL无法启动的解决办法示例分享的详细内容,更多请关注【创想鸟】其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/1609237.html

(0)
上一篇 2025年2月18日 23:35:04
下一篇 2025年2月18日 23:35:31

AD推荐 黄金广告位招租... 更多推荐

相关推荐

发表回复

登录后才能评论