0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MYSQLの起動の際のエラーの備忘録

Posted at

エラー詳細

MySQLを起動しようとしたら以下のようなエラーが出た。

Mysql.server start
Starting MySQL
.... ERROR! The server quit without updating PID file (/opt/homebrew/var/mysql/xxxxx.pid)

色々な解法を試してみたがどれもうまくいかなかった。

試したこと

エラーファイルの削除

cd /opt/homebrew/var/mysql/
rm xxxxx.err

起動しようとすると新しいファイルが作成される。

裏で動いているMySQLのPID削除

ps aux | grep mysql
sudo kill -9 PID

消した側から新しいのが出てきて解決しなかった...

最終的に解決した方法

errファイルの中に以下の文があった。

[ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 

なのでこれで検索をかけるとプロセスの削除が必要らしい。

ps -efw | grep -i mysql
sudo  pkill mysqld

これを行った後無事に起動できた。
おそらくPID経由だとしっかり削除できていなかったんだと思う。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?