1,使用service 啟動、關閉MySQL服務
service mysql start
service mysql stop
service mysql restart
運行上面命令,其實是service命令去找/etc/init.d下的相關的mysql腳本去執行啟動、關閉動作。
2,使用/etc/init.d/mysql啟動、關閉MySQL服務,
[root@DB-Server bin]# /etc/init.d/mysql start
Starting MySQL....[ OK ]
[root@DB-Server bin]# /etc/init.d/mysql stop
Shutting down MySQL..[ OK ]
[root@DB-Server bin]#