在Linux系統(tǒng)中,重啟數(shù)據(jù)庫(kù)的命令取決于所使用的數(shù)據(jù)庫(kù)管理系統(tǒng)。以下是幾種常見的數(shù)據(jù)庫(kù)管理系統(tǒng)及其對(duì)應(yīng)的重啟命令:
使用service
命令:sudo service mysql restart
使用systemctl
命令:sudo systemctl restart mysql
使用/etc/init.d/
腳本:sudo /etc/init.d/mysql restart
使用service
命令:sudo service postgresql restart
使用systemctl
命令:sudo systemctl restart postgresql
使用pg_ctl
命令:sudo -u postgres pg_ctl restart -D /var/lib/postgresql/data
使用service
命令:sudo service mongod restart
使用systemctl
命令:sudo systemctl restart mongod
使用mongod
命令:sudo mongod --shutdown && sudo mongod
請(qǐng)根據(jù)您所使用的數(shù)據(jù)庫(kù)管理系統(tǒng)選擇適當(dāng)?shù)拿钸M(jìn)行重啟。