Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?)

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
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) –  Matthieu Riegler Oct 21 '12 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 % –  Gant Oct 21 '12 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. –  Matthieu Riegler Oct 21 '12 at 22:21
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.