mysql.service failed
by sirlinux from LinuxQuestions.org on (#5DSMK)
Hi
After I made a few changes in the /etc/mysql/mysql.conf.d/mysqld.cnf and saved it,
I tried to restart it:
john@ubuntu-02:~$ sudo systemctl restart mysql
Code:Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.I ran:
john@ubuntu-02:~$ systemctl status mysql.service
Code: mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2021-02-05 08:10:26 UTC; 26ms ago
Process: 28426 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCES>
Process: 28434 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 28434 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 99 (Cannot assign requested address)
Feb 05 08:10:26 ubuntu-02 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 08:10:26 ubuntu-02 systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 05 08:10:26 ubuntu-02 systemd[1]: Failed to start MySQL Community Server.
then I ran:
john@ubuntu-02:~$ journalctl -xe
Code:Feb 05 08:53:27 ubuntu-02 systemd[1]: mysql.service: Scheduled restart job, res>
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the re>
-- the configured Restart= setting for the unit.
Feb 05 08:53:27 ubuntu-02 systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 6549 and the job result is done.
Feb 05 08:53:27 ubuntu-02 systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has begun execution.
--
-- The job identifier is 6549.What's the matter with it?
Could you help me please?
Thanks


After I made a few changes in the /etc/mysql/mysql.conf.d/mysqld.cnf and saved it,
I tried to restart it:
john@ubuntu-02:~$ sudo systemctl restart mysql
Code:Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.I ran:
john@ubuntu-02:~$ systemctl status mysql.service
Code: mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2021-02-05 08:10:26 UTC; 26ms ago
Process: 28426 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCES>
Process: 28434 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 28434 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 99 (Cannot assign requested address)
Feb 05 08:10:26 ubuntu-02 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 08:10:26 ubuntu-02 systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 05 08:10:26 ubuntu-02 systemd[1]: Failed to start MySQL Community Server.
then I ran:
john@ubuntu-02:~$ journalctl -xe
Code:Feb 05 08:53:27 ubuntu-02 systemd[1]: mysql.service: Scheduled restart job, res>
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the re>
-- the configured Restart= setting for the unit.
Feb 05 08:53:27 ubuntu-02 systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 6549 and the job result is done.
Feb 05 08:53:27 ubuntu-02 systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has begun execution.
--
-- The job identifier is 6549.What's the matter with it?
Could you help me please?
Thanks