Resolving MySQL InnoDB ibdata1 Lock Errors and Server Startup Failure
This article details a MySQL InnoDB startup failure caused by ibdata1 lock errors, explains the underlying resource‑unavailable issue, and walks through removing stale socket lock files and restarting the server to achieve a successful launch.
The MySQL server failed to start, repeatedly logging errors such as
2021-11-24T10:40:09.891923+08:00 1 [ERROR] [MY-012574] [InnoDB] Unable to lock /data/mysql/mysql/ibdata1 error: 11and indicating that the system tablespace could not be opened.
These messages indicate that InnoDB could not obtain an exclusive lock on the ibdata1 file because the operating system returned error number 11, meaning the resource is temporarily unavailable, often due to leftover lock files or stale socket files.
To resolve the issue, the administrator removed the lock files with commands like rm -rf mysql.sock.lock and rm -rf mysqlx.sock.lock, then attempted to start MySQL again using /etc/init.d/mysqld start.
After the lock files were cleared, the server started successfully, as shown by the log line Starting MySQL..... SUCCESS!, confirming that the database is now operational.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Practical DevOps Architecture
Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
