Open MySQL server for remote access


I have a server running Windows Web Server 2007. On this I have IIS 7 and am running MySql.

This is running fine over localhost. However, I want to hook up remotely from my machine while developing to the server.

As its working over localhost, I assume i just need to open up port 3307 on the firewall. Now I'm worried about security with this? could anyone please advise the safest way to do this and if poss please provide some instructions so I can ensure that its protected?

Thanks in advance.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel WilsonCommented:
You probably need to adjust permissions as well, but for the firewall question ...

Does your development machine (or rather its network) have a fixed public address?  If so, open a hole in the firewall for only that IP.
flynnyAuthor Commented:

Yes and no. The work address has a fixed IP so I could fix it for that. However I was also hoping to work fro home but this doesnt have a fixed IP.

Server side from windows firewall I just tried opening the 3306 port for now doing the following;

1. New Rule.
2. Select Port
3. Select TCP specific port 3306
4. Allow the connection
5. Rule applies Domain/Private/Public all selected.
6. Named the rule.

I then loaded MySQL workbench locally to test the connection.

Setup new connection -> Standard TCP/IP
Server: IPaddress of server por 3306.
user: root and password

I am assuming it is connecting but I get the error;

'Access denied for user'
'root'@'' (Using password:YES)

now I dont understand the @ '' as the domain doesnt relate to the server? can I set this?
flynnyAuthor Commented:
ok I think I am getting somewhere.

following this article;

I can see localhost is the only value in the list of the hosts table. This is great and will be fine for my work location, as I can add the IP. How can I fix this issue for the public ip issue working from home?
The Lifecycle Approach to Managing Security Policy

Managing application connectivity and security policies can be achieved more effectively when following a framework that automates repeatable processes and ensures that the right activities are performed in the right order.

Daniel WilsonCommented:

This way of doing it creates a user@specified_IP with access.  I would consider adding

with the same password.
flynnyAuthor Commented:
Ok thanks.

Any ideas on how i can handle the home issue with no static ip??

I assume as long as I don't renew the connection I can just added the current ip?
Daniel WilsonCommented:
Consider using a dynamic DNS provider.

create user 'home_user'@'' identified by 'my_cool_password';

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Daniel WilsonCommented:
Using a domain name does suggest a slower connection b/c DNS lookups will be involved.  But for development rather than production, I doubt it will matter.
flynnyAuthor Commented:
brilliant thank you for your help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.