linux 重啟mysql redis等服務器


redis重啟

如果是用apt-get或者yum install安裝的redis,

可以直接通過下面的命令停止/啟動/重啟

/etc/init.d/redis-server stop

/etc/init.d/redis-server start

/etc/init.d/redis-server restart

因為安裝的時候是當成了服務器,如果是安裝的源代碼,要不就自己去配置成服務,要不就只能進入redis客服端里面 使用 shutdown

 https://blog.csdn.net/hacker_Lees/article/details/99673333  狀態等查詢

 

mysql 重啟 

一、 啟動方式 ubuntu
 
1、使用 service 啟動:service mysql start

2、使用 mysqld 腳本啟動:/etc/inint.d/mysql start

3、使用 safe_mysqld 啟動:safe_mysql&

二、停止 ubuntu

1、使用 service 啟動:service mysql stop

2、使用 mysqld 腳本啟動:/etc/inint.d/mysql stop


三、重啟 ubuntu

1、使用 service 啟動:service mysql restart

2、使用 mysqld 腳本啟動:/etc/inint.d/mysql restart

 

conteOS

參考 https://www.jianshu.com/p/5e29228ce897

 

通用的方式就是直接 kill  掉 然后重新啟動就行了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM