kwksdy
kwksdy

Reputation: 91

Installing MySQL on El Capitan

I am attempting a fresh install of mysql on a new iMac running OSX 10.11. I downloaded the latest 10.10 dmg and followed installation directions, but when I try to run mysql, I get the

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

I have spent several hours reading answers here and elsewhere as to how to fix it, and nothing has worked so far.

What I know:

The /tmp/mysql.sock file has been renamed /tmp/mysql.sock.lock. Apparently, if I could get mysqld to run, it would make a new socket file, but when I try to get mysqld to run (either from the Terminal or System Preferences) it just fails and produces the same error. Likewise, when I try to run mysqladmin it fails and produces the same error.

When I run mysqld_safe, it produces the following, but doesn’t clear up the socket error:

151206 16:40:20 mysqld_safe Logging to '/usr/local/mysql/data/XXXXXXs-iMac.err'.

151206 16:40:20 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

151206 16:42:01 mysqld_safe mysqld from pid file /usr/local/mysql/data/XXXXXXs-iMac.pid ended

When I ran mysql on Lion, I was always able to clear up socket errors by running mysqld_safe.

Advice?

Upvotes: 0

Views: 859

Answers (1)

ml242
ml242

Reputation: 109

Run the command 'sudo mysqld' from the command line to launch the server.

Upvotes: 0

Related Questions