0

I need enable the remote access for mysql on my Mac (OS X 10.8).

I installed MySQL from the .dmg downloaded from the MySQL website (So no MAMP). I works great on localhost, now how do I enable remote access?

Do I need to enable port-forwarding on my rooter to make it work (by default it is on port 3306, right?)

2 Answers 2

2

You need to GRANT privileges to an account with hostname "%", for forwarding ports, refer to your routers manual or use Portforward. We can't help you without knowing your router model, just try to search a bit for yourself.

3
  • 1
    Port forwaring is not the problem. I know how to do it. Just wanted to know if it was necessary. Is there nothing else to do than greating privileges ? (I thought i needed to create or modify some config file) Oct 21, 2012 at 22:09
  • No, in older versions of MySQL you would have to set certain IP addresses that can access the whole server, but newer versions accept this kind of whitelist per grant - if you know the MySQL database will only be accessed by one remote IP, you can simply use that IP instead of %
    – Aurelia
    Oct 21, 2012 at 22:17
  • It won't be one remote ip so I went for the %. I enabled the port forwarding. I'm try this tomorrow to see if it works. Thx. Oct 21, 2012 at 22:21
1

Yes, you need to set a NAT for the port. Then you will be able to access from anywhere but not from your local network by trying to access via your WAN IP. It will not work if you test it with your WAN IP on your local computer. Just try from another computer not on the same network.

And also be sure that you granted the port access in the firewall if you use one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .