InnoDB: Unable to lock ./ibdata1 error: 11 / Another process with pid is using it
A second mysqld (or a stale process) holds the InnoDB data file, so the new server cannot start.
Unable to lock ./ibdata1InnoDB Unable to lock ibdata1 error 11Another process with pid is using it Meaning
InnoDB takes an advisory lock on ibdata1 at start-up. If an old server is still running, or two instances share a data directory, the lock fails and the server exits.
Common causes
- Previous mysqld still running
- Two instances using the same datadir
- Stale lock after a crash on NFS
- Container started twice with the same volume
⚡ Quick fix
- Find and stop the other process (
ps aux | grep mysqld) - Use a unique datadir per instance
- Avoid NFS for the data directory
Detailed fix by platform
Linux
ps aux | grep [m]ysqldandsudo lsof /var/lib/mysql/ibdata1
How to diagnose
- Process — Another mysqld?
- Datadir — Shared?
- Filesystem — Local disk?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in MySQL
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 2 Dec 2026