The correct method for restarting MySQL in Linux: 1. Use MySQLservicemysqldrestart2 installed in the rpm package, and use MySQLlinux installed in the source package to disable MySQL commands.
How to restart MySQL in Linux: 1. Use MySQLservice mysqld restart2 installed in the rpm package, and disable MySQL commands installed in the source package. // linux
The correct method to restart MySQL in Linux:
1. MySQL installed through the rpm package
Service mysqld restart
2. Install MySQL from the source code package
// Linux Command to disable MySQL
$ Mysql_dir/bin/mysqladmin-uroot-p shutdown
// Linux Command to start MySQL
$ Mysql_dir/bin/mysqld_safe &
Mysql_dir is the installation directory of MySQL, and mysqladmin and mysqld_safe are located in the bin directory of the installation directory of MySQL, which is easy to find.
3. If none of the above methods are valid, you can use the Force Command "killall mysql" to close MySQL. However, this method is not recommended, this brutal method forcibly terminates the MySQL database service and may cause table corruption.
Step or method: 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.
MySQL start, stop, restart method:
I. Startup Mode
1. start with service: service mysqld start
2. Use the mysqld script to start:/etc/inint. d/mysqld start
3. Start with safe_mysqld: safe_mysqld &
Ii. Stop
1. Start with service: service mysqld stop
2. Use the mysqld script to start:/etc/inint. d/mysqld stop
3. mysqladmin shutdown
3. Restart
1. Start with service: service mysqld restart
2. Use the mysqld script to start:/etc/inint. d/mysqld restart
,