Help us understand the problem. What is going on with this article?

【MySQL】起動の仕方

状況

MySQLが起動できない。
データベースの中身を全部消しても問題ない。
失敗1~3 => 成功 の順番で実行した。

成功

参考
mysqlがどうしても起動しない

実行コマンド
sudo rm -rf /usr/local/var/mysql
brew uninstall mysql
brew install mysql
sudo mysql.server start

Starting MySQL
. SUCCESS!

mysql -u root

Welcome to the MySQL monitor.  

失敗1

参考
MySQLクライアントに Can't read dir of '/usr/local/etc/my.cnf.d' と言われた。

実行コマンド
mkdir my.cnf.d

エラー

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

失敗2

参考
mysqlが起動できない

実行コマンド
sudo touch /tmp/mysql.sock
sudo chown mysql:mysql /tmp
mysql.server restart

エラー

 ERROR! MySQL server PID file could not be found!
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/MBP-3.local.pid).

失敗3

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

実行コマンド
touch MBP-3.local.pid

エラー

なぜか作っても消えてしまう。。。

ERROR! MySQL server PID file could not be found!
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/MBP-3.local.pid).
wafuwafu13
メモ感覚で書いてます。
https://twitter.com/wafuwafu13_
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした