错误一览
2020-06-29 0:17:42 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-06-29 0:17:43 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-06-29 0:17:43 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-06-29 0:17:44 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-06-29 0:17:44 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-06-29 0:17:45 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-06-29 0:17:45 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-06-29 0:17:46 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-06-29 0:17:46 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-06-29 0:17:47 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-06-29 0:17:47 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-06-29 0:17:48 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-06-29 0:17:48 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-06-29 0:17:49 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-06-29 0:17:49 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-06-29 0:17:49 0 [Note] InnoDB: Unable to open the first data file
2020-06-29 0:17:49 0 [ERROR] InnoDB: Operating system error number 11 in a file operation.
2020-06-29 0:17:49 0 [ERROR] InnoDB: Error number 11 means 'Resource temporarily unavailable'
2020-06-29 0:17:49 0 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
2020-06-29 0:17:49 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
2020-06-29 0:17:49 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!
2020-06-29 0:17:49 0 [ERROR] InnoDB: Plugin initialization aborted with error Cannot open a file
2020-06-29 0:17:49 0 [Note] InnoDB: Starting shutdown...
2020-06-29 0:17:50 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-06-29 0:17:50 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-06-29 0:17:50 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-06-29 0:17:50 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-06-29 0:17:50 0 [ERROR] Aborting
解决方案
- 官网查询错误代码11
Operating System Error Codes - MariaDB Knowledge Base
https://mariadb.com/kb/en/operating-system-error-codes
Number | Error Code | Description |
---|---|---|
11 | EAGAIN | Try again |
重试之后也没用
- 尝试移走删除报错文件
cd /var/lib/mysql
ll
total 188492
-rw-rw---- 1 mysql mysql 16384 Jun 28 22:43 aria_log.00000001
-rw-rw---- 1 mysql mysql 52 Jun 28 22:43 aria_log_control
-rw-rw---- 1 mysql mysql 7007 Jun 28 22:43 ib_buffer_pool
-rw-rw---- 1 mysql mysql 79691776 Jun 28 22:49 ibdata1
-rw-rw---- 1 mysql mysql 50331648 Jun 28 23:18 ib_logfile0
-rw-rw---- 1 mysql mysql 50331648 Jun 22 09:17 ib_logfile1
-rw-rw---- 1 root root 12582912 Jun 28 23:18 ibtmp1
-rw-rw---- 1 mysql mysql 0 Jun 22 09:28 multi-master.info
drwx------ 2 mysql mysql 4096 Jun 22 09:17 mysql
-rw-rw---- 1 mysql mysql 351 Jun 28 21:52 mysql-bin.000001
-rw-rw---- 1 mysql mysql 351 Jun 28 22:19 mysql-bin.000002
-rw-rw---- 1 mysql mysql 351 Jun 28 22:31 mysql-bin.000003
-rw-rw---- 1 mysql mysql 351 Jun 28 22:32 mysql-bin.000004
-rw-rw---- 1 mysql mysql 351 Jun 28 22:43 mysql-bin.000005
-rw-rw---- 1 mysql mysql 95 Jun 28 22:32 mysql-bin.index
-rw-rw---- 1 mysql mysql 0 Jun 28 22:43 mysql-bin.state
drwx------ 2 mysql mysql 4096 Jun 22 09:17 performance_schema
移除或者删除以下三个文件:(注意备份)
ibdata1、ib_logfile0、ib_logfile1
重启mariadb/mysql