MYSQL [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
生活随笔
收集整理的這篇文章主要介紹了
MYSQL [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1:重啟
[root@iZuf63x5aylgn2n11k2sllZ etc]# systemctl restart mysql Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.日志:
2019-04-16T10:00:46.450639Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2019-04-16T10:00:47.450753Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11 2019-04-16T10:00:47.450808Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2019-04-16T10:00:47.450827Z 0 [Note] InnoDB: Unable to open the first data file 2019-04-16T10:00:47.450856Z 0 [ERROR] InnoDB: Operating system error number 11 in a file operation. 2019-04-16T10:00:47.450893Z 0 [ERROR] InnoDB: Error number 11 means 'Resource temporarily unavailable' 2019-04-16T10:00:47.450908Z 0 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html 2019-04-16T10:00:47.450918Z 0 [ERROR] InnoDB: Cannot open datafile './ibdata1' 2019-04-16T10:00:47.450930Z 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data! 2019-04-16T10:00:47.450946Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Cannot open a file 2019-04-16T10:00:47.751293Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2019-04-16T10:00:47.751337Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2019-04-16T10:00:47.751349Z 0 [ERROR] Failed to initialize builtin plugins. 2019-04-16T10:00:47.751356Z 0 [ERROR] Aborting2019-04-16T10:00:47.751375Z 0 [Note] Binlog end 2019-04-16T10:00:47.751517Z 0 [Note] Shutting down plugin 'MyISAM' 2019-04-16T10:00:47.751563Z 0 [Note] Shutting down plugin 'CSV' 2019-04-16T10:00:47.751892Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete3:查看
[root@iZuf63x5aylgn2n11k2sllZ etc]# systemctl status mysql.service ● mysql.service - LSB: start and stop MySQLLoaded: loaded (/etc/rc.d/init.d/mysql; bad; vendor preset: disabled)Active: failed (Result: exit-code) since Tue 2019-04-16 18:00:48 CST; 4min 31s agoDocs: man:systemd-sysv-generator(8)Process: 10859 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS)Process: 11563 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)CGroup: /system.slice/mysql.service├─ 893 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/izm5ei6slp0lyg8ksv21xiz.pid└─1244 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/loca...Apr 16 17:59:06 iZuf63x5aylgn2n11k2sllZ systemd[1]: Starting LSB: start and stop MySQL... Apr 16 18:00:48 iZuf63x5aylgn2n11k2sllZ mysql[11563]: Starting MySQL.....................................................................................................T...).[FAILED] Apr 16 18:00:48 iZuf63x5aylgn2n11k2sllZ systemd[1]: mysql.service: control process exited, code=exited status=1 Apr 16 18:00:48 iZuf63x5aylgn2n11k2sllZ systemd[1]: Failed to start LSB: start and stop MySQL. Apr 16 18:00:48 iZuf63x5aylgn2n11k2sllZ systemd[1]: Unit mysql.service entered failed state. Apr 16 18:00:48 iZuf63x5aylgn2n11k2sllZ systemd[1]: mysql.service failed. Hint: Some lines were ellipsized, use -l to show in full.4:kill
[root@iZuf63x5aylgn2n11k2sllZ etc]# kill -9 893 [root@iZuf63x5aylgn2n11k2sllZ etc]# systemctl status mysql.service ● mysql.service - LSB: start and stop MySQLLoaded: loaded (/etc/rc.d/init.d/mysql; bad; vendor preset: disabled)Active: activating (start) since Tue 2019-04-16 18:15:17 CST; 38s agoDocs: man:systemd-sysv-generator(8)Process: 10859 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS)Control: 12268 (mysql)CGroup: /system.slice/mysql.service├─ 1244 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/loc...├─12268 /bin/sh /etc/rc.d/init.d/mysql start├─12276 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/iZuf63x5aylgn2n11k2sllZ.pid├─12692 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/loc...└─12780 sleep 1Apr 16 18:15:17 iZuf63x5aylgn2n11k2sllZ systemd[1]: Starting LSB: start and stop MySQL... [root@iZuf63x5aylgn2n11k2sllZ etc]# kill -9 1244 [root@iZuf63x5aylgn2n11k2sllZ etc]# systemctl status mysql.service ● mysql.service - LSB: start and stop MySQLLoaded: loaded (/etc/rc.d/init.d/mysql; bad; vendor preset: disabled)Active: active (running) since Tue 2019-04-16 18:16:31 CST; 8s agoDocs: man:systemd-sysv-generator(8)Process: 10859 ExecStop=/etc/rc.d/init.d/mysql stop (code=exited, status=0/SUCCESS)Process: 12268 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=0/SUCCESS)CGroup: /system.slice/mysql.service├─12276 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/iZuf63x5aylgn2n11k2sllZ.pid└─12692 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/loc...Apr 16 18:15:17 iZuf63x5aylgn2n11k2sllZ systemd[1]: Starting LSB: start and stop MySQL... Apr 16 18:16:31 iZuf63x5aylgn2n11k2sllZ mysql[12268]: Starting MySQL.........................................................................[ OK ] Apr 16 18:16:31 iZuf63x5aylgn2n11k2sllZ systemd[1]: Started LSB: start and stop MySQL. [root@iZuf63x5aylgn2n11k2sllZ etc]#5:new CMD
mysqladmin -uroot -p shutdown
netstat -lntp
systemctl restart mysql
netstat -lntp
systemctl status mysql.service
?
總結(jié)
以上是生活随笔為你收集整理的MYSQL [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql5.7主从
- 下一篇: mysql5.6 error