MySQL Daemon Failed to Start - centos 6

MySQL Daemon Failed to Start - centos 6

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

MySQL Daemon Failed to Start: Diagnosing Permission Errors on CentOS 6

When you execute service mysqld start and immediately hit the "MySQL Daemon Failed to Start" error, the service is almost certainly not crashing due to a complex logic bug in the binary. Instead, it is failing at the operating system level, typically because of permission issues or missing data files required for initialization.

The most glaring clue in your mysql.log reveals the root cause immediately:

/usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
...
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1

Error code errno: 13 is the Unix standard for "Permission denied." This confirms that the MySQL server process cannot read or write to specific files in /var/lib/mysql. You cannot simply create a new mysql.sock file to bypass this. The socket file is created by the daemon itself upon successful startup; if the daemon fails due to permission errors on its data directory, the socket will never be generated. Attempting to manually create and touch the socket file is futile because the underlying process that should manage it is blocked from starting.

Understanding Error 13 in the Data Directory

On CentOS 6, the MySQL service usually runs under the mysql user. This user must have ownership of the data directory (/var/lib/mysql) and its subdirectories. If you have manually copied files, restored a backup, or recently updated the package without cleaning up old permissions, the directory might be owned by root instead of mysql, or have restrictive mode settings like 700 instead of 755.

The log explicitly mentions ibdata1, which is the InnoDB system tablespace. If the mysqld user cannot open this file, the engine cannot initialize, causing the entire daemon to abort before it can create the socket or load any SQL tables. This explains why you see "Plugin 'FEDERATED' is disabled" followed immediately by a crash; the server never reached the point where plugins are fully loaded or the standard mysql database schema is accessible.

Fixing Ownership and Permissions

To resolve this, you must ensure the mysql user owns the data directory and that the permissions allow read/write access for the group. Execute the following commands as root:

chown -R mysql:mysql /var/lib/mysql
chmod -R 750 /var/lib/mysql

After adjusting ownership, check your log file again to ensure there are no other missing .frm or .ibd files that might indicate a corrupted installation. If the data directory contains files from a different MySQL version, you may need to remove them and reinstall the package specific to CentOS 6.

Handling the Upgrade Failure

You mentioned running mysql_upgrade and receiving a "FATAL ERROR: Upgrade failed." This command is intended to adjust system tables for newer features, but it requires the server to be fully functional. Since the server is currently down due to permission errors on ibdata1, you cannot run mysql_upgrade until the directory permissions are corrected first.

Once you have fixed the ownership and permissions described above, restart the service:

service mysqld start

Verify that the socket file appears at /var/lib/mysql/mysql.sock. If it does not appear after a few seconds, check the log again for new errors. If the error persists even with correct permissions, you may have an orphaned PID file preventing restarts or a corrupted ibdata1 file requiring a fresh installation of the MySQL data directory.

If you are integrating this database into a Laravel application hosted on CentOS 6, ensure your .env configuration matches the actual socket path and that your web server user (often apache or httpd) has the necessary permissions to read the socket if direct TCP/IP connections are disabled.

Our network