1、linux下查看mysql服務的兩種方式:
方式一:mysql
[root@localhost bin]ps -ef|grep mysql
方式二:linux
[root@localhost bin]netstat -nlp
![](http://static.javashuo.com/static/loading.gif)
2、linux下啓動mysql服務的兩種方式:
命令行方式:sql
[root@localhost bin]cd /usr/bin [root@localhost bin]./mysqld_safe &
服務方式:ruby
- 1
[root@localhost ~]service mysql start
- 2
若是服務在啓動狀態,直接重啓服務用如下命令:
- 3
[root@localhost ~]service mysql restart
3、linux下關閉mysql服務的兩種方式:
命令行方式:spa
[root@localhost ~]mysqladmin -u root shutdown
服務方式:命令行
[root@localhost ~]service mysql stop