Home > Database > Mysql Tutorial > body text

如何正确重启 mysql服务器

WBOY
Release: 2016-06-07 17:52:18
Original
1865 people have browsed it

很多朋友重启mysql都是直接在进程中结束那样是不正确的,下面我来总结一下关于如何正确的重启mysql服务器吧。

windows如何重启mysql 开始->运行->cmd

停止:net stop mysql

启动:net start mysql

前提MYSQL已经安装为windows服务 

wind 方法二

开始-运行-输入:services.msc-点确定-找到MySQL-在上面右键-重新启动。这样就行了

linux 中

RedHat Linux (Fedora Core/Cent OS)
1.启动:/etc/init.d/mysqld start
2.停止:/etc/init.d/mysqld stop
3.重启:/etc/init.d/mysqld restart
Debian / Ubuntu Linux
1.启动:/etc/init.d/mysql start
2.停止:/etc/init.d/mysql stop
3.重启:/etc/init.d/mysql restart
Windows
1.点击“开始”->“运行”(快捷键Win+R)
2.启动:输入 net stop mysql
3.停止:输入 net start mysql
提示
Redhat Linux 也支持service command,
启动:# service mysqld start
停止:# service mysqld stop
重启:# service mysqld restart
Windows下不能直接重启(restart),只能先停止,再启动。 ......

推荐的安全重启方法

$mysql_dir/bin/mysqladmin -u root -p shutdown
$mysql_dir/bin/mysqld_safe &

mysqladmin和mysqld_safe位于Mysql安装目录的bin目录下

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!