How to restart mysql in linux

青灯夜游
Release: 2023-02-06 19:22:26
Original
63171 people have browsed it

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版本命令)
Copy after login

2), use mysqld script to start:

/etc/init.d/mysqld restart
Copy after login

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)
Copy after login

2), use mysqld script to start:

/etc/inint.d/mysqld start
Copy after login

3), use safe_mysqld to start:

safe_mysqld&
Copy after login

c, stop

1), use service to start:

service mysqld stop
Copy after login

2), use mysqld script to start:

/etc/inint.d/mysqld stop
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template