40
51

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MySQL起動できなくなった The server quit without updating PID file

Posted at

プログラミング初心者のエラー対処メモ

DBにMySQLを使ったRailsアプリを起動させるのにMySQLを起動させようとしたところエラーが発生

$ sudo mysql.server start
Password:
Starting MySQL
.. ERROR! The server quit without updating PID file (/usr/local/var/mysql/****.local.pid).

ググってこちらの質問のベストアンサーを参考にやってみた
MySQLを起動する際にエラーが発生します。

PIDファイルのエラーの件は、/usr/local/var/mysql/マック名.local.errの権限の問題らしいのですが、

$ chown [mysqlの動作ユーザ名] /usr/local/var/mysql/***.local.err 

でもエラー

usr/local/var/mysql/mysql にいって再起動してみる

$ usr/local/var/mysql/mysql > sudo mysql.server restart
Password:
 ERROR! MySQL server PID file could not be found!
Starting MySQL
.. ERROR! The server quit without updating PID file (/usr/local/var/mysql/.local.pid).

PID fileが見つからないとのエラーだったのでファイルの生成をしてみる

$ /usr/local/var/mysql/mysql > touch /usr/local/var/mysql/****.local.pid

再起動

$ /usr/local/var/mysql/mysql > sudo mysql.server restart
 ERROR! MySQL server PID file could not be found!
Starting MySQL
. SUCCESS!

起動した!

40
51
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
40
51

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?