Three methods for starting, stopping, and restarting the MySQL database under Ubuntu Server are described in detail.
Three methods for starting, stopping, and restarting the MySQL database under Ubuntu Server
System Environment: ubuntu server 12.10x64 (mysql comes with the System)
When we need to modify the MySQL configuration file my. cnf (my. ini in windows) for some settings, we need to restart MySQL after the modification.
The path of my. cnf file is/ect/mysql/my. cnf.
Waring: MySQL cannot be started if the file is configured incorrectly.
The following describes how to start, stop, and restart MySQL:
Start mysql:
Method 1:
sudo /etc/init.d/mysql start
Method 2:
sudo start mysql
Method 3:
sudo service mysql start
Stop mysql:
Method 1:
sudo /etc/init.d/mysql stop
Method 2:
sudo stop mysql
Method 3:
sudo service mysql stop
Restart mysql:
Method 1:
sudo/etc/init.d/mysql restart
Method 2:
sudo restart mysql
Method 3:
sudo service mysql restart
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.