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


More than 3 years have passed since last update.
  • Mac OSX 10.8.5
  • Homebrew
  • MySQL (Homebrewでインストール)




$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
# おっと、mysqlが起きていなかった。
$ sudo mysql.server start
Starting MySQL
.. ERROR! The server quit without updating PID file (/*******)


$ sudo chown -R _mysql:_mysql /usr/local/var/mysql
$ sudo mysql.server start
Starting MySQL

$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.11 Homebrew

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

へっぽこエンジニア。 AI技術、データ分析を使って社会をハッピーにしたい。
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