mysqld.service failed because a timeout was exceeded

Viewed 6628

With this command:

sudo systemctl restart mysqld

I face with this error:

Job for mysqld.service failed because a timeout was exceeded. See "systemctl status mysqld.service" and "journalctl -xe" for details.

How can I solve it?

3 Answers

Most probably you have huge database that requires a lot of time to start. If that's the case then you can change the service start timeout to something that will work for you. To do that add this line to the service file:

TimeoutSec=1200

or

TimeoutStartSec=1200

If you are using MariaDB then the file is located at this path:

/usr/share/mysql/systemd/mariadb.service

If you are using MySQL then probably the path is:

/usr/share/mysql/systemd/mysqld.service
Related