Question
I get:
root@server [~]# service stop mysql
The service command supports only basic LSB actions
(start, stop, restart, try-restart, reload, force-reload, status). For other actions,
please try to use systemctl.
What is the correct way to stop/start/restart the MySQL service?
Answer
On cPanel servers, the easiest way to stop, start, restart MySQL is via the cPanel RestartSrv script.
/scripts/restartsrv_mysql --stop
/scripts/restartsrv_mysql --start
/scripts/restartsrv_mysql --restart
Note: Centos 6 uses "service" commands. On Centos 7, you should use "systemctl" commands.
systemctl stop mysql
systemctl start mysql
systemctl restart mysql
These are essentially the same commands that cPanel will perform when you try restarting with RestartSrv.
Comments
0 comments
Article is closed for comments.