Benches Uncategorized

1

mysql.sock - connection error (code 2002)

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Performed a clean install of SL Server.
Enabled Web and MySQL services.

When using GUI (SequelPro of MySQL GUI Tools) I get a mysql.sock connection error.

"Could not connect to MySQL instance at localhost. Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (code 2002)"

The database location of MySQL is /var/mysql. Thus a reference to /tmp/mysql.sock is obviously wrong.
The file /var/mysql/mysql.sock does exist but apparently no reference is made to this file.

Q: How to make a reference to the correct socket file,

Coen

info from Terminal:

mysql> status
--------------
mysql Ver 14.12 Distrib 5.0.82, for apple-darwin10.0 (i386) using EditLine wrapper

Connection id: 6
Current database:
Current user: s2xladmin@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.82-log Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/mysql/mysql.sock
Uptime: 1 day 3 hours 41 min 7 sec

Threads: 1 Questions: 12 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.000
--------------

Message was edited by: Coen Jeukens

1 reply

Sign in or join Beachball Help to reply.

  1. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    It looks looks like the Sequel Pro app is guessing incorrectly that the mysql.sock is in /tmp. If that's the problem, you should be able to fix it by going to Sequel Pro's Connection panel and entering the correct path, which is /var/mysql/mysql.sock.