unable to lock ibdata1 MySQL Origin: Data OSI layer 7 · Application Last updated 2 Dec 2026

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.

Exact message you may see Unable to lock ./ibdata1InnoDB Unable to lock ibdata1 error 11Another process with pid is using it
Seen on: MySQL

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

  1. Find and stop the other process (ps aux | grep mysqld)
  2. Use a unique datadir per instance
  3. Avoid NFS for the data directory

Detailed fix by platform

Linux

  1. ps aux | grep [m]ysqld and sudo lsof /var/lib/mysql/ibdata1

How to diagnose

  1. Process — Another mysqld?
  2. Datadir — Shared?
  3. 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:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

1005 — MySQL ERROR 1005 (HY000): Can't create table (errno: 150 "Foreign key constraint is incorrectly formed") (MySQL)100557P03 — FATAL: the database system is starting up (PostgreSQL)57P03marked as crashed — ERROR 145 (HY000): Table './db/t' is marked as crashed and should be repaired (MySQL)marked as crashedMySQL won't start — Job for mysql.service failed because the control process exited with error code (MySQL)MySQL won't startORA-01034 — ORA-01034: ORACLE not available (ORA-27101: shared memory realm does not exist) (SQL)ORA-01034port 5432 in use — LOG: could not bind IPv4 address "0.0.0.0": Address already in use — Is another postmaster already running on port 5432? (PostgreSQL)port 5432 in usepostmaster.pid — FATAL: lock file "postmaster.pid" already exists — Is another postmaster running in data directory? (PostgreSQL)postmaster.pidunable to…

Explore the map of this error Full error map →

🧠 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.