博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MySQL无法启动
阅读量:2441 次
发布时间:2019-05-10

本文共 3007 字,大约阅读时间需要 10 分钟。

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/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

 

[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.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
[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 ~]$

 

 

转载地址:http://ymnqb.baihongyu.com/

你可能感兴趣的文章
怎么计算任意矩形交圆形面积_C ++程序根据用户的选择来计算圆形,矩形或三角形的面积...
查看>>
怎么查找键盘注册表键值_C程序查找通过键盘输入的数字列表的平均值
查看>>
C语言中的斐波那契数列程序
查看>>
C程序查找给定字符是字母,数字还是任何特殊字符(使用ASCII值)
查看>>
微信小程序抽奖随机整数生成_C程序生成整数除数
查看>>
rs485输入输出等效电阻_C程序输入星期几(1-7)并将其转换为星期几的等效名称...
查看>>
摄氏温度转换为华氏温度超时_C程序将温度从华氏温度转换为摄氏温度或将摄氏温度转换为华氏温度...
查看>>
方幂序列 c+~+_C ++程序查找序列1 + x + x ^ 2 +……+ x ^ n的和
查看>>
C程序打印一个字符的ASCII值
查看>>
整型任意顺序判断2的幂_C程序将任意数x提升为正幂n
查看>>
接受5门科目成绩并输出平均成绩的C程序
查看>>
获取后台运行程序的屏幕打印_C程序在屏幕上打印消息
查看>>
小程序获取地图圆的半径_接受圆半径并打印其区域的C程序
查看>>
冒泡法排序c语言程序_C ++中的冒泡排序程序
查看>>
C ++程序创建模拟时钟
查看>>
井字游戏设计一个算法_井字游戏
查看>>
C ++程序计数 文件STORY.TXT中存在的字母,数字和空格的集合
查看>>
c语言程序打印闪动图形_C ++程序使用图形打印人
查看>>
c++立方函数_C ++程序使用函数查找数字的立方
查看>>
c ++小写字母转大写字母_C ++程序在大写字母中从*的A到L打印字母
查看>>