InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

Category : MySQL

Fix mysqld process using the same InnoDB data or log files Problem

Own a MySQL server and facing Database connection failures and crashes? The reason could be duplicate SQL queries and Processes running on your server. There is an easy fix for this problem.

MySQL Logs throws an error as below

InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

To solve this we will kill all the mysql processes running on the server and start the mysql server manually.

Requirements

  • sudo access to MySQL server

Procedure

  1. Login to the MySQL server
  2. Verify the logs in location /var/lib/mysql/logs/$hostname
    Note – $hostname is your server hostname
  3. Logs should contain an error as below
    InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
  4. Run the following commands to kill mysql processes running on the server
    sudo killall -u mysql
    or
    sudo killall -9 mysql
    Note – Flags -u kills all the processes started by user mysql
    -9 flag kills all the mysql process running by all users across the server
    For proper mysql processes cleanup you can run both commands without any harm.
  5. Start mysql server daemon
    sudo service mysqld start
  6. Your mysql server should be running fine with the problem fixed.