この内容は古いバージョンです。最新バージョンを表示するには、戻るボタンを押してください。
バージョン:10
ページ更新者:atom
更新日時:2026-05-13 03:04:40

タイトル: MySQLの起動、停止、再起動(Linux)
SEOタイトル: MySQLの起動、停止、再起動(CentOS, Ubuntu)

この記事の要点
  • Linux で MySQL を起動・停止・再起動するコマンド集
  • CentOS / RHEL 系: service mysqld start|stop|restart もしくは /etc/init.d/mysqld ...
  • Ubuntu / Debian 系: systemctl start|stop|restart mysql
  • systemd 採用ディストロでは systemctl 形式が標準。CentOS 7+ も同じ

 

起動

■CentOS

service mysqld start

or

/etc/init.d/mysqld start

 

■Ubuntu

systemctl start mysql

 

停止

■CentOS

service mysqld stop

or

/etc/init.d/mysqld stop

 

■Ubuntu

systemctl stop mysql

 

 

再起動

■CentOS

service mysqld restart

or

# /etc/init.d/mysqld restart

 

■Ubuntu

sudo systemctl restart mysql

 

確認

■CentOS

service mysqld status

or

/etc/init.d/mysql status