啓動mysql:html
方式一:sudo /etc/init.d/mysql start
方式二:sudo start mysql
方式三:sudo service mysql start
sudo ./mysqld_safe
中止mysql:
方式一:sudo /etc/init.d/mysql stop
方式二:sudo stop mysql
方式三:sudo service mysql stop
重啓mysql:
方式一:sudo/etc/init.d/mysql restart
方式二:sudo restart mysql
方式三:sudo service mysql restart
************************************************
ubuntu下的操做
sue@suepc:/$ whereis mysql
mysql: /usr/bin/mysql /etc/mysql /usr/lib/mysql /usr/bin/X11/mysql /usr/include/mysql /usr/local/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gzmysql
1.sql
sue@suepc:/$ sudo /usr/bin/service mysql startubuntu
..
* MySQL Community Server 5.7.19 is started
sue@suepc:/$ sudo /etc/init.d/mysql stop
...
* MySQL Community Server 5.7.19 is stoppedspa
2.
sue@suepc:/$ sudo /etc/init.d/mysql start
..
* MySQL Community Server 5.7.19 is started
sue@suepc:/$ rest