LoginSignup
1
3

More than 1 year has passed since last update.

ERROR! The server quit without updating PID fileが出て、MySQLをアンインストールする前に確認して欲しいこと

Last updated at Posted at 2021-02-08

PIDがないとのエラー

terminal
Starting MySQL
.. ERROR! The server quit without updating PID file (/opt/homebrew/var/mysql/username.local.pid).

ググると、PIDファイルを作ったり、権限を与えたりしなさいという記事が多い。

しかし、PIDファイルを作って再起動した途端なぜかPIDファイルが消滅している。
何度作ってもまた消える逆ゾンビ状態に。
再インストールする前に以下を確認。

エラーログの確認

/opt/homebrew/var/mysql/username.local.err
ここ
実際のパスは環境によって違いますがこのエラーファイルにエラー原因が出ているかもしれないのでlessで中身を確認。

terminal
$ less /opt/homebrew/var/mysql/username.local.err
.
中略
.
[ERROR] [MY-000067] [Server] unknown variable ‘timezone=UTC’.
[ERROR] [MY-010119] [Server] Aborting

結構ボリュームありますけど、**[ERROR]**の文字を探す。
多分最後の方にある。

私の場合は、直前にmy.cnfに追記した、
timezone=UTC
がまずかったみたいなので削除。

再起動

からの起動

terminal

Starting MySQL
.. SUCCESS!

MySQLを削除せずにすみました。
基本的にはまずエラーログを確認しよう。

1
3
0

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
1
3