0

I have MySQL running on an Apple OS X 10.14 machine. I use MailSteward Pro to access it, and it works fine locally from that machine. From another machine on the same LAN, which can ping the SQL server machine just fine, I get this error:

Failed to connect to server: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I am not specifying a different .sock file on the connection on the MySQL server machine. What am I doing wrong - how to debug this?

Barmar
  • 741,623
  • 53
  • 500
  • 612
Mike Levin
  • 13
  • 3
  • That's the default when you don't specify a hostname, or use `localhost`. – Barmar Jul 27 '21 at 15:52
  • 1
    Does this answer your question? [Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)](https://stackoverflow.com/questions/5376427/cant-connect-to-local-mysql-server-through-socket-var-mysql-mysql-sock-38) – Luuk Jul 27 '21 at 15:53
  • You need to use `mysql -h "name or address of machine with MySQL"` – Barmar Jul 27 '21 at 15:53
  • @Luuk That's for a different problem where the server is located on the same machine. – Barmar Jul 27 '21 at 15:54
  • ok I checked my.conf and I see: # Default Homebrew MySQL server config [mysqld] # Only allow connections from localhost bind-address = 127.0.0.1 - does this line somehow restrict access only to localhost? – Mike Levin Jul 27 '21 at 22:45
  • I did the GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' and now I see: "Failed to connect to server: Error: Can't connect to MySQL server on '10.0.1.3' (61)" - how to debug - how do I tell where it's going wrong? – Mike Levin Jul 31 '21 at 02:35

0 Answers0