systemctl start mariadb error but systemctl status mysql running

manoaratefy

Active Member
Nov 17, 2018
33
3
8
Madagascar
cPanel Access Level
Root Administrator
Good morning,

I have a very strange issue with one of our server.

When I do systemctl restart mariadb, it fails. But when I do systemctl restart mysql, it works. Seems also like systemctl restart mariadb doesn't have any impact on the running mysql daemon, MySQL uptime is not reset.

When I look at systemctl status mariadb, it says:
Code:
Jul 20 16:31:21 cpanel24.example.com systemd[1]: mariadb.service start operation timed out. Terminating.
Do you have any ideas why it is doing this?

EDIT: I tried to shutdown mysql and restart it using cPanel script:
/scripts/restartsrv_mysql --stop
/scripts/restartsrv_mysql --start

Now, systemctl status mysql show that mysql is inactive and systemctl status mariadb show that mariadb is running. Shouldn't them be active simultaneously like on my other servers?
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
Technically you should always be using /scripts/restartsrv_mysql on cPanel servers. It's the preferred method of stopping/starting services. Are you running MariaDB on this server? What is the output of the following:

Code:
mysql --version
When I check the status of the service using systemctl on my test server running mariadb i get the following:
Code:
[[email protected] ~]# systemctl status mariadb
● mariadb.service - MariaDB 10.3.23 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Fri 2020-07-17 16:58:49 CDT; 3 days ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 1470 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─1470 /usr/sbin/mysqld

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[[email protected] ~]# systemctl status mysql
● mariadb.service - MariaDB 10.3.23 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Fri 2020-07-17 16:58:49 CDT; 3 days ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 1470 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─1470 /usr/sbin/mysqld

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
This doesn't show MySQL and MariaDB running simultaneously it just redirects the status check for MySQL to MariaDB