一、linux下查看mysql服務的兩種方式:
方式一:
[root@localhost bin]ps -ef|grep mysql
方式二:
[root@localhost bin]netstat -nlp
二、linux下啟動mysql服務的兩種方式:
命令行方式:
[root@localhost bin]cd /usr/bin [root@localhost bin]./mysqld_safe &
服務方式:
- 1
[root@localhost ~]service mysql start
- 2
如果服務在啟動狀態,直接重啟服務用以下命令:
- 3
[root@localhost ~]service mysql restart
三、linux下關閉mysql服務的兩種方式:
命令行方式:
[root@localhost ~]mysqladmin -u root shutdown
服務方式:
[root@localhost ~]service mysql stop
轉載於:https://blog.csdn.net/king_1421484363/article/details/73277771