Home  >  Article  >  Operation and Maintenance  >  How to restart mysql in linux

How to restart mysql in linux

青灯夜游
青灯夜游Original
2021-03-01 14:58:5462923browse

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.

How to restart mysql in linux

#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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn