Different ways to restart MySQL under Windows and Linux

Not directly reboot (restart) under Windows, only the first stop, and then start.

MySQL start, stop, restart methods:

First, the use iis7 server monitoring tool :

As shown in FIG. Press, check the desired operation, then click the "execution" button.

First, start-up mode

1, start using the service: service mysqld start

2, using a script to start mysqld: /etc/inint.d/mysqld start

3, the use safe_mysqld start: safe_mysqld &

Second, stop

1, start using the service: service mysqld stop

2, using a script to start mysqld: /etc/inint.d/mysqld stop

3、mysqladmin shutdown

Third, restart

1, start using the service: service mysqld restart

2, using a script to start mysqld: /etc/inint.d/mysqld restart

 

Linux, MySQL restart the right way:

1, by the rpm package MySQL

service mysqld restart

2, from the source packages installed MySQL

// linux command to shut down MySQL

$mysql_dir/bin/mysqladmin -uroot -p shutdown

// linux start the MySQL command

$mysql_dir/bin/mysqld_safe &

Which mysql_dir for the MySQL installation directory, located under mysqladmin and mysqld_safe MySQL installation directory bin directory, easy to find.

3, above all else fails, you can force through the command: "killall mysql" to shut down MySQL, but not recommended to use this way, because this barbaric method will be forced to terminate the MySQL database service, may result in damage to the table

Or method steps: RedHat the Linux ( Fedora Core / Cent the 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 the net start mysql
prompt * Redhat Linux also supports the service command, start: # service mysqld start Stop: # service mysqld stop reboot: # service mysqld restart

 

Guess you like

Origin www.cnblogs.com/09Internet/p/11387636.html