Home >Operation and Maintenance >Linux Operation and Maintenance >How to restart mysql in linux
How to restart mysql in Linux: 1. Use the service command to restart, with the syntax "service mysqld restart" or "service mysql restart"; 2. Use the mysqld script to restart and execute "/etc/init.d/mysqld restart" command.
#The operating environment of this tutorial: Red Hat Enterprise Linux 6.1 system, Dell G3 computer.
1. Check the mysql version
Method one: status;
Method two: select version();
2. Common commands to start, stop and restart Mysql
a, restart
1), Use service to start:
service mysqld restart service mysql restart (5.5.7版本命令)
2), use mysqld script to start:
/etc/init.d/mysqld restart
b, start method
1), use service to start:
[root@localhost /]# service mysqld start (5.0版本是mysqld) [root@szxdb etc]# service mysql start (5.5.7版本是mysql)
2), use mysqld script to start:
/etc/inint.d/mysqld start
3), use safe_mysqld to start:
safe_mysqld&
c, stop
1), use service to start:
service mysqld stop
2), use mysqld script to start:
/etc/inint.d/mysqld stop
3), mysqladmin shutdown
Related recommendations: " Linux video tutorial》
The above is the detailed content of How to restart mysql in linux. For more information, please follow other related articles on the PHP Chinese website!