未加星标

MySQL无法启动的解决办法

字体大小 | |
[数据库(mysql) 所属分类 数据库(mysql) | 发布者 店小二05 | 时间 | 作者 红领巾 ] 0人收藏点击收藏

mysql无法启动的解决办法

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

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

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

120608 09:56:17 mysqld_safe Starting mysqld daemon with databases from /disk/mysql
120608 9:56:17 [Note] Plugin 'FEDERATED' is disabled.
120608 9:56:17 InnoDB: The InnoDB memory heap is disabled
120608 9:56:17 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
120608 9:56:17 InnoDB: Compressed tables use zlib 1.2.3
120608 9:56:17 InnoDB: Using linux native AIO
120608 9:56:17 InnoDB: Initializing buffer pool, size = 128.0M
120608 9:56:17 InnoDB: Completed initialization of buffer pool
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
120608 9:56:17 InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
...
 好像是原来的 mysqld 并没有停下来。
强制终止 mysqld

[[email protected] ~]$ 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.pid
mysql 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.sock
root 17947 1 0 09:56 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/disk/mysql --pid-file=/disk/mysql/www.pid
mysql 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.sock
root 18099 17514 0 09:56 pts/1 00:00:00 grep mysql
[[email protected] ~]$ killall mysqld
[[email protected] ~]$ killall mysqld
[[email protected] ~]$ ps -ef|grep mysql
root 18116 17514 0 09:57 pts/1 00:00:00 grep mysql
[[email protected] ~]$
 启动 mysqld ,现在执行多次启动命令都没有问题。

[[email protected] ~]$ service mysql start
Starting MySQL. SUCCESS!
[[email protected] ~]$
[[email protected] ~]$
[[email protected] ~]$
[[email protected] ~]$
[[email protected] ~]$ service mysql start
Starting MySQL SUCCESS!
[[email protected] ~]$

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

[[email protected] ~]$ perror 11
OS error code 11: Resource temporarily unavailable
[[email protected] ~]$
[[email protected] ~]$

 如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

本文数据库(mysql)相关术语:navicat for mysql mysql workbench mysql数据库 mysql 存储过程 mysql安装图解 mysql教程 mysql 管理工具

主题: InnoDBSQLMySQLLinuxUCSU谢大
分页:12
转载请注明
本文标题:MySQL无法启动的解决办法
本站链接:http://www.codesec.net/view/565248.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 数据库(mysql) | 评论(0) | 阅读(39)