InnoDB: Check that you do not already have another mysqld process 错误解决办法

非正常关机之后 再次启动mysql 失败

错误信息如下:

150721 15:45:27 mysqld_safe Starting mysqld daemon with databases from /opt/mysql/data
150721 15:45:27 [Note] Flashcache bypass: disabled
150721 15:45:27 [Note] Flashcache setup error is : ioctl failed

150721 15:45:27 [Note] Plugin 'FEDERATED' is disabled.
150721 15:45:27 [Warning] option 'innodb-additional-mem-pool-size': signed value 200 adjusted to 524288
150721 15:45:27 InnoDB: The InnoDB memory heap is disabled
150721 15:45:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150721 15:45:27 InnoDB: Compressed tables use zlib 1.2.3
150721 15:45:27 InnoDB: Using Linux native AIO
150721 15:45:27 InnoDB: Initializing buffer pool, size = 1.0G
150721 15:45:28 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.
150721 15:45:28  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
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

 

解决办法:

[root@192-168-102-57 log]# ps -ef|grep mysql
root     11979     1  0 Jul16 ?        00:00:00 /bin/sh /opt/mysql/bin/mysqld_safe --datadir=/opt/mysql/data --pid-file=/opt/mysql/data/192_168_102_47.sky-mobi.com.hz.bj.pid
mysql    12749 11979  0 Jul16 ?        00:03:19 /opt/mysql/bin/mysqld --basedir=/opt/mysql --datadir=/opt/mysql/data --plugin-dir=/opt/mysql/lib/mysql/plugin --user=mysql --log-error=/opt/mysql/log/alert.log --open-files-limit=65535 --pid-file=/opt/mysql/data/192_168_102_47.sky-mobi.com.hz.bj.pid --socket=/opt/mysql/run/mysql.sock --port=3306
root     29336 29085  0 15:48 pts/1    00:00:00 grep mysql

 

可以看到有其它进程占用了 mysql的data文件夹

kill 掉这些进程之后 再次启动 mysql 正常启动

 

总结: 再启动mysql之前 先查看一下是否有其它的进程 占用mysql的数据文件

如果有则杀掉占用的进程 再启动mysql

 

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值