1

I'm a mac novice and trying to get a developer setup to develop php sites locally. The sites he develops have a mysql backend and that is on a remote box. We got xampp installed and working, he can connect from the website to the local mysql box but he cannot connect to the remote box. He is using the exact same connection info I am using from my windows system. I do not have any issues. Also the mysql server is setup to accept all users (we are currently using root) regardless of hostname.

I searched his system and I could not find a mysql.sock file. I do not know what this does, but googled some articles that mentioned.

Please help if you can.

SirM
  • 487
  • 6
  • 22
  • I figured it out! During the process I granted root with a wildcard host db permissions. However, once i ran a FLUSH PRIVILEGES on mysql it started working. duh! – SirM Nov 04 '11 at 14:43

2 Answers2

1

The mysql.sock file is relevant only to the machine the MySQL server is running on, for local clients to communicate with the server. For any remote machines, they'll be connecting via TCP on port 3306.

Make sure that port 3306 is open in the server machine's firewall, and that MySQL has been configured to allow TCP connections.

Marc B
  • 356,200
  • 43
  • 426
  • 500
  • I am able to connect to the remote mysql server from a window machine using the exact same website. So it appears the the port and connection are open, unless that would be different on a window box for some reason? – SirM Nov 03 '11 at 21:30
1

Try Telnetting to the server from your host and see if you get a response.

telnet host 3306

If that doesn't work, you probably have some local firewall on your mac that is blocking the connection. Also, one thing you don't mention is that you can connect from a windows computer and not a mac... are they on the same network? If they're on different networks or in different places, that could indicate a local network issue.

This is definitely not an issue with mysql, but with something on the Mac itself.

Jericon
  • 4,992
  • 3
  • 20
  • 22
  • Thanks Jericon, I tried the telnet and got GHost '192.168.44.125' is not allowed to connect to this MySQL serverConnection closed by foreign host. – SirM Nov 04 '11 at 12:48