MySQL restart command for each platform

Source: Internet
Author: User

Inux platform and Windows platform MySQL restart method

The correct way to restart MySQL under Linux:

1. mysql installed via RPM package

Service mysqld Restart

2. mysql installed from the source package

Linux shutdown mysql Command

$mysql _dir/bin/mysqladmin-uroot-p shutdown

Linux commands to start MySQL

$mysql _dir/bin/mysqld_safe &

Where Mysql_dir is the MySQL installation directory, mysqladmin and Mysqld_safe are located in the bin directory of the MySQL installation directory and are easily found.

3, the above methods are invalid, can be forced by the command: "Killall MySQL" to shut down MySQL, but it is not recommended in this way, because this barbaric method will forcibly terminate the MySQL database service, it is possible to cause table corruption

Steps or methods: 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 key Win+r).

2. Start: Enter net stop MySQL

3. Stop: Enter net start MySQL

Hint * Redhat Linux also supports service command, boot: # service mysqld start stop: # service mysqld Stop restart: # service mysqld Restart

* Windows can not be restarted directly (restart), can only stop, then start.

MySQL start, stop, restart method:

First, the starting mode

1. Start with service: Service mysqld start

2. Start with mysqld script:/etc/inint.d/mysqld start

3. Use Safe_mysqld to start:safe_mysqld&

Second, stop

1. Start with service: Service mysqld stop

2. Start with mysqld script:/etc/inint.d/mysqld stop

3, mysqladmin shutdown

Third, restart

1. Start with service: Service mysqld restart

2. Start with mysqld script:/etc/inint.d/mysqld restart

MySQL restart command for each platform

Related Article

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.