1、检查mysql的进程,如为X
2、kill X,与kill -9 X的区别
1)kill x :mysql的服务会停掉
2)kill -9 x:mysql的服务停掉,守护进程会将mysql服务拉起来
3)手动启动mysql服务
service mysqld start
4)手动停止mysql服务
service mysqld stop
5)命令行启动,命令行启动不支持restart
[root@VM-16-14-centos ~]# mysqld --no-defaults --user=mysql
汇总:
RedHat Linux上启停mysql
service mysqld start
service mysqld status
service mysqld stop
systemctl start mysqld
systemctl status mysqld
systemctl stop mysqld
mysqladmin shutdown
mysql -e 'shutdown'
mysql -e 'restart'
mysqld --user=mysql & #命令行启动不支持restart