Open MySQL server for remote access

Hi,

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.

Matt
flynnyAsked:
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.
0
flynnyAuthor Commented:
hmm.

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'@'remote.seperateurl.co.uk' (Using password:YES)

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

following this article;

http://serverfault.com/questions/230012/mysql-access-denied-for-user-rootx-x-x-x

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?
0
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:
http://www.rackspace.com/knowledge_center/article/mysql-connect-to-your-database-remotely

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

with the same password.
0
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?
0
Daniel WilsonCommented:
Consider using a dynamic DNS provider.


http://dev.mysql.com/doc/refman/5.1/en/account-names.html

create user 'home_user'@'my_name.dynamicdns.com' identified by 'my_cool_password';
0

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.
0
flynnyAuthor Commented:
brilliant thank you for your help
0
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.