How to correctly restart the mysql server

Source: Internet
Author: User
It is incorrect for many friends to restart mysql directly at the end of the process. I will summarize how to correctly restart the mysql server.

It is incorrect for many friends to restart mysql directly at the end of the process. I will summarize how to correctly restart the mysql server.

How to restart mysql in windows-> Run-> cmd

Stop: net stop mysql

Start: net start mysql

If MYSQL is installed as a windows service

Wind method 2

Start-run-input: services. msc-click OK-find MySQL-right-click above-restart. That's all.

Linux

RedHat Linux (Fedora Core/Cent OS)
1. start:/etc/init. d/mysqld start
2. stop:/etc/init. d/mysqld stop
3. restart:/etc/init. d/mysqld restart
Debian/Ubuntu Linux
1. start:/etc/init. d/mysql start
2. stop:/etc/init. d/mysql stop
3. restart:/etc/init. d/mysql restart
Windows
1. Click Start> Run (shortcut: Win + R)
2. Start: Enter net stop mysql
3. Stop: Enter net start mysql
Prompt
Redhat Linux also supports service command,
Start: # service mysqld start
Stop: # service mysqld stop
Restart: # service mysqld restart
In Windows, you cannot directly restart (restart). You can only stop the instance and start it again. ......

Recommended secure Restart Method

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

Mysqladmin and mysqld_safe are located in the bin directory of the Mysql installation directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.