[ERROR] InnoDB: Unable to lock ./ibdata1,error: 11

错误如下:

2020-05-19 09:28:19 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:19 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:20 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:20 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:21 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:21 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:22 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:22 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:23 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:23 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:24 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:24 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:25 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:25 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:26 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:26 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:27 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:27 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:28 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:28 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:29 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:29 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:30 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:30 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:31 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:31 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:32 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:32 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-05-19 09:28:33 11082 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2020-05-19 09:28:33 11082 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

分析:

错误显示无法锁定 ./ibdata1 这个文件,那么他一定是被其他的进程占用了

解决方法:

我们可以使用 ps -aux |grep mysql* 来查询相关的进行,然后查询到PID之后,用kill命令,将其强制杀死,然后重新启动数据库即可
[ERROR] InnoDB: Unable to lock ./ibdata1,error: 11

猜你喜欢

转载自blog.51cto.com/14989214/2548261
今日推荐