Ask A Question

Notifications

You’re not receiving notifications from this thread.

Setup MacOS 10.9 Mavericks Discussion

Chris Oliver asked in General

when I try this command: mysql -u root -p

Enter password:

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

Reply

I tried to install mysql already three times. I even removed all packages with brew and started from scratch. Nothing works. I get a whole lot of unreadable errors when i tried to install mysql via brew. please help what to do:
alexandershekhtman770@gmail.com. thank you.

here is the whole error report:

Last 15 lines from /Users/alexander/Library/Logs/Homebrew/mysql/post_install.01.mysqld:
2017-01-26 02:51:00 -0800

/usr/local/Cellar/mysql/5.7.17/bin/mysqld
--initialize-insecure
--user=alexander
--basedir=/usr/local/Cellar/mysql/5.7.17
--datadir=/usr/local/var/mysql
--tmpdir=/tmp

2017-01-26T10:51:00.896146Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-01-26T10:51:00.902385Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-01-26T10:51:00.902439Z 0 [ERROR] Aborting

Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mysql`
==> Caveats
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation

To connect run:
mysql -uroot

To have launchd start mysql now and restart at login:
brew services start mysql
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Summary
🍺 /usr/local/Cellar/mysql/5.7.17: 14,226 files, 456.3M, built in 14 minutes

Reply

if someone has errors with db:rake not working, here is the solution:
http://stackoverflow.com/qu...

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 84,256+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.