Timeout error occurred trying to start MySQL Daemon

Hi, have you been faced the above mentioned error when you trying to start the mysql service? Well here are some solutions that can be taken to resolve the issue.

Error:-

[[email protected]]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

  1. Check the mysql log for the best practice of troubleshooting. Here is some example taken out from the mysql log:-

[[email protected]]# tail /var/log/mysqld.log

160824 12:47:11 mysqld ended

160824 12:49:36 mysqld started
160824 12:49:36 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to 4294967295
160824 12:49:36 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to 4294967295
160824 12:49:36 InnoDB: Started; log sequence number 0 43655
160824 12:49:36 [ERROR] /usr/libexec/mysqld: Can’t create/write to file ‘/var/run/mysqld/mysqld.pid’ (Errcode: 13)
160824 12:49:36 [ERROR] Can’t start server: can’t create PID file: Permission denied
160824 12:49:36 mysqld ended

2. Do the checking on ERROR in the above log which is:-

[ERROR] /usr/libexec/mysqld: Can’t create/write to file ‘/var/run/mysqld/mysqld.pid’

[ERROR] Can’t start server: can’t create PID file: Permission denied

3. It was clearly mention about the permission denied when it was trying to create the pid file on /var/run/mysqld/.  So, we can list out the permission for the directory of /var/run/mysqld by running the below command:-

ls -ld /var/run/mysqld

and you got below result:

drwx—–T 5 root root 4096 Aug 24 12:45 /var/run/mysqld

4. Change the directory permission to 755 so the system can create the pid file in that directory. The command will be:-

chmod 755 /var/run

5. Verify the permission by running again below command:-

ls -ld /var/run/mysqld

and you should be getting below result:-

drwxr-xr-x 2 mysql mysql 4096 Aug 24 12:59 /var/run/mysqld

6. Start the mysql service:-

[[email protected]]# /etc/init.d/mysqld start
Starting MySQL: [ OK ]
[[email protected]]# /etc/init.d/mysqld status
mysqld (pid 19633) is running…

and done, you are able to start the mysql service. Thanks for viewing!