[Solved] InnoDB: Unable to lock ./ibdata1 error: 35

I’m trying to start MySQL in safe mode but the log file just keeps spitting out:

[ERROR] InnoDB: Unable to lock ./ibdata1 error: 35
[Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.


  1. I’ve stopped all mysql processes and have checked using the ps command
  2. I’ve read this having repeated trouble with MySQL and Snow Leopard – Unable to lock ./ibdata1, error: 35
Solution #1:

Strange error codes, both from MySQL and the operating system, can be explained by running a shell command perror which is a part of MySQL distribution. On Linux, for example, perror 35 returns OS error code 35: Resource deadlock avoided. I do not have an OSX system handy to test, but from this:

I gather that error 35 is “Resource temporarily unavailable”, meaning that some other process (possibly another instance of mysqld?) has already locked the file.

To debug, first I would check if there is another MySQL process running by chance (looks like you already have), and if not, reboot for good measure to make sure there are no strange stale file locks, and then try again.

Somebody has run into this error before, and found a solution:

mysql_install_db, error: 35, on a Mac OS X 10.9.1

Respondent: Sasha Pachev
Solution #2:

Just had this issue with MAMP Pro. Couldn’t stop or start MySQL. Typed ps aux | grep mysql, then kill [process id] for each line. Then I could successfully launch MySQL again from MAMP Pro.

Respondent: Nico Prat
Solution #3:

I had a similar issue after updating MAMP from 4.x to 5.x

Unfortunately the only way that I could manage to resolve this was by manually removing all of my database files (moving them into another directory) then starting MySQL via MAMP; this seemed to work.

The files in question (for me) were in:

/Library/Application Support/appsolute/MAMP PRO/db/mysql57

All of the files in this directory (except the mysql directory) need moving somewhere else. I was then able to start MySQL.

I realise this isn’t a very useful answer for most situations, but if this is a local development environment (like MAMP, as in my case) then I think losing the local databases is probably acceptable.

Respondent: Sean
The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy