Link to home
Start Free TrialLog in
Avatar of flynny
flynnyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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
Avatar of Daniel Wilson
Daniel Wilson
Flag of United States of America image

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.
Avatar of flynny

ASKER

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?
Avatar of flynny

ASKER

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?
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.
Avatar of flynny

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Daniel Wilson
Daniel Wilson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of flynny

ASKER

brilliant thank you for your help