ubuntu16.04下,mysql服务相关的命令各种写法
2019-12-13 本文已影响0人
CoderZb
1.查看mysql服务的状态(以下三种写法等效)
sudo service mysql status
/etc/init.d/mysql status
sudo systemctl status mysql.service
2.开启mysql服务(以下三种写法等效)
sudo service mysql start
/etc/init.d/mysql start
sudo systemctl start mysql.service
3.关闭mysql服务
sudo service mysql stop
/etc/init.d/mysql stop
sudo systemctl stop mysql.service
4.重启mysql服务
sudo service mysql restart
/etc/init.d/mysql restart
sudo systemctl restart mysql.service