问题
在执行命令重启数据库服务的时候,出现以下错误:
[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'
解决
- 注意日志中的以下提示:
[Note]InnoDB:Check that you do not already have another mysqld porcess using the same InnoDB data or log files.
- 检查进程
ps -ef | grep mysql
后发现有个数据库的进程在运行 kill -9 进程id
杀掉进程,后重启成功