Mysql (mariadb 103) - Unable to lock ./ibdata1 error: 11

A Hartonian

Active Member
May 22, 2018
44
11
8
Oman
cPanel Access Level
DataCenter Provider
Hello,

In one of my servers mysql won't start. It keeps failing. The error log is:

Code:
[root@bingo ~]# tail -50 /var/lib/mysql/bingo.err
2020-07-12  4:03:58 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:03:58 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:03:59 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:03:59 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:00 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:00 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:01 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:01 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:02 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:02 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:03 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:03 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:04 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:04 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:05 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:05 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:06 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:06 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:07 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:07 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:08 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:08 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:09 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:09 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:10 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:10 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:11 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:11 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:12 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:12 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:13 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:13 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:14 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2020-07-12  4:04:14 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2020-07-12  4:04:14 0 [Note] InnoDB: Unable to open the first data file
2020-07-12  4:04:14 0 [ERROR] InnoDB: Operating system error number 11 in a file operation.
2020-07-12  4:04:14 0 [ERROR] InnoDB: Error number 11 means 'Resource temporarily unavailable'
2020-07-12  4:04:14 0 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
2020-07-12  4:04:14 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
2020-07-12  4:04:14 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-07-12  4:04:14 0 [ERROR] InnoDB: Plugin initialization aborted with error Cannot open a file
2020-07-12  4:04:14 0 [Note] InnoDB: Starting shutdown...
2020-07-12  4:04:14 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-07-12  4:04:14 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-07-12  4:04:14 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-07-12  4:04:14 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2020-07-12  4:04:14 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-07-12  4:04:14 0 [ERROR] Aborting

Warning: Memory not freed: 520
Tried all the possible solutions to recover the mysql gracefully but no hope.
Tried to rebuild the server and restore backups, got worst, realized that the backups weren't running since 6 days ago due to an error in my settings. So rebuilding is off the table.

This is my.cnf :
Code:
[root@bingo ~]# cat /etc/my.cnf
[client-server]
!includedir /etc/my.cnf.d

[mysqld]
log-error = /var/lib/mysql/bingo.err
performance-schema = 0
innodb_file_per_table = 1
max_allowed_packet = 268435456
open_files_limit=80000
local-infile=0
sql_mode=""
I would appreciate if you could share your knowledge on this.

Thank you
 
Last edited:

andrew.n

Well-Known Member
Jun 9, 2020
995
368
63
EU
cPanel Access Level
Root Administrator
What does the followings says?

ps aux | grep mysqld
ps aux | grep mysql
ps aux | grep mariadb
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
It does sound like there could be another process running. How are you attempting to start the service? You could run the command @andrew.n asked for in one as follows:

ps faux |egrep 'mysql|mariadb'

(a grep for mysql will also pull up mysqld)