linux停止mysql服務(wù)的方法:1、在終端中執(zhí)行“mysqladmin -u root shutdown”命令關(guān)閉mysql服務(wù)即可;2、在終端中執(zhí)行“service mysql stop”命令關(guān)閉mysql服務(wù)即可。
本教程操作環(huán)境:linux5.9.8系統(tǒng)、mysql8版本、Dell G3電腦。
linux下查看mysql服務(wù)的兩種方式:
方式一:
[root@localhost bin]ps -ef|grep mysql
方式二:
[root@localhost bin]netstat -nlp
linux下關(guān)閉停止mysql服務(wù)的兩種方式:
命令行方式:
[root@localhost ~]mysqladmin -u root shutdown
服務(wù)方式:
[root@localhost ~]service mysql stop
linux下啟動mysql服務(wù)的兩種方式:
命令行方式:
[root@localhost bin]cd /usr/bin [root@localhost bin]./mysqld_safe &
服務(wù)方式:
[root@localhost ~]service mysql start 如果服務(wù)在啟動狀態(tài),直接重啟服務(wù)用以下命令: [root@localhost ~]service mysql restart
【