Plesk shows SQLSTATE[HY000] [2002] No such file or directory: InnoDB: Unable to lock ./ibdata1 error: 11

Created:

2017-01-22 17:30:41 UTC

Modified:

2017-08-08 13:12:25 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk shows SQLSTATE[HY000] [2002] No such file or directory: InnoDB: Unable to lock ./ibdata1 error: 11

Applicable to:

  • Plesk for Linux

Symptoms

Plesk and websites are inaccessible:

PLESK_INFO: ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory (Abstract.php:144)

In MySQL log the following error occurs on attempt to start/stop mysql service:

# tail -fn0 /var/log/mysql/error.log
2017-01-22T16:52:20.749410Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2017-01-22T16:52:20.749499Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

Cause

File ./ibdata1 locked by another process.

Resolution

  1. Connect to the server using SSH.
  2. Stop MySQL service:

    # service mysql stop

    Note: MySQL service name may be 'mysqld', 'mariadb'.
  3. Find process which locks the file:

    # lsof -i:3306
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    mysqld 28670 mysql 19u IPv4 34752690 0t0 TCP localhost:mysql (LISTEN)

    OR

    # lsof /var/lib/mysql/ibdata1

  4. Kill this process

    # kill -9 28670

  5. Start MySQL service:

    # service mysql start

Have more questions? Submit a request
Please sign in to leave a comment.