数据库无法启动:InnoDB:Unable to lock /data/ibdata1 error:11

问题

在执行命令重启数据库服务的时候,出现以下错误:

[ERROR]InnoDB:Unable to lock /data/ibdata1 error:11
[Note]InnoDB:Check that you do not already have another mysqld porcess using the same InnoDB data or log files.
[ERROR]InnoDB: Cannot open datafile '/data/ibdata1'

解决

  1. 注意日志中的以下提示:
[Note]InnoDB:Check that you do not already have another mysqld porcess using the same InnoDB data or log files.
  1. 检查进程ps -ef | grep mysql后发现有个数据库的进程在运行
  2. kill -9 进程id杀掉进程,后重启成功

猜你喜欢

转载自blog.csdn.net/qq_44209563/article/details/108658351