MySQL got down now! You would received a statement from WHM and cPanel.
But still, you are running with mysqld_safe till now:
You can use mysqld_safe for restarting the MySQL again after the down. You have got an error so, now restarting the MySQL so that, new features will be added for your safety precaution.
Still, MySQL indicates an error. Be careful with your next step.
Check the MariaDB version in EL7 which ranges between 10.4.4 and 10.1.7. It might lead to some issues where systmed and init script have a race condition. At the same time, mysqld_safe helps to get restarted with MySQL but that’s a bad idea. Somehow, we’ll try to manage the situation with all alternatives.
Check with the following command that MariaDB is enabled or not
Try with this example:
Now, stop with MySQL and do restartsrv script restart again:
You will not get errors from now onwards!
Code:
# /usr/local/cpanel/scripts/restartsrv_mysql --status (XID l35tte) The “mysql” service is down.
Code:
# ps fauxww | grep mysq[l] root 1030 0.0 0.1 113632 1593 ? S 12:31 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/host.hostname.tld.pid mysql 1134 0.0 8.7 1305384 88427 ? Sl 12:31 0:01 \_ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/host.hostname.tld.err --open-files-limit=10000 --pid-file=/var/lib/mysql/$hostname.pid
Still, MySQL indicates an error. Be careful with your next step.
Check the MariaDB version in EL7 which ranges between 10.4.4 and 10.1.7. It might lead to some issues where systmed and init script have a race condition. At the same time, mysqld_safe helps to get restarted with MySQL but that’s a bad idea. Somehow, we’ll try to manage the situation with all alternatives.
Check with the following command that MariaDB is enabled or not
Code:
systemctl enable mariadb
Code:
# systemctl enable mariadb Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service. Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service. Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
Code:
/usr/local/cpanel/scripts/restartsrv_mysql --stop /usr/local/cpanel/scripts/restartsrv_mysql –start