1、方法一
[root@iZ8vb409m8717ruqk6uowlZ ~]# service mysql stop #停止
Shutting down MySQL.. [ OK ]
[root@iZ8vb409m8717ruqk6uowlZ ~]# service mysql start #启动
Starting MySQL. [ OK ]
[root@iZ8vb409m8717ruqk6uowlZ ~]# service mysql restart #重启
Shutting down MySQL.. [ OK ]
Starting MySQL. [ OK ]
2、方法二
[root@iZ8vb409m8717ruqk6uowlZ ~]# systemctl stop mysql #停止
[root@iZ8vb409m8717ruqk6uowlZ ~]# systemctl start mysql #启动
[root@iZ8vb409m8717ruqk6uowlZ ~]# systemctl restart mysql #重启
3、方法三,去到安装mysql的目录下的support-files下执行
[root@iZ8vb409m8717ruqk6uowlZ support-files]# ./mysql.server stop #停止
Shutting down MySQL.. [ OK ]
[root@iZ8vb409m8717ruqk6uowlZ support-files]# ./mysql.server start #启动
Starting MySQL. [ OK ]
[root@iZ8vb409m8717ruqk6uowlZ support-files]# ./mysql.server restart #重启
Shutting down MySQL.. [ OK ]
Starting MySQL. [ OK ]
4、其他情况、方法一或方法二都失败,把 mysql 改为 mysqld