ps -ef|grep mysql 先把mysql的进程杀掉:
重启mysql命令:
service mysqld restart
service mysql restart (5.5.7版本命令)
如果报错:
Redirecting to /bin/systemctl restart mysqld.service
则使用以下命令:
systemctl restart mysqld重启mysql:
systemctl status mysqld查看mysql的状态:
还有其他类似命令:
systemctl start mysqld.service
systemctl stop mysqld.service