Log in

View Full Version : Database Remote Access


hayward6
08-11-2008, 07:14 AM
How do you go about setting up a remote connection to your database? I think I have it all figured out, but I can't get it working. Basicaly I have port 3306 forwarded to the server and I want to use Database tools on my laptop so I can finaly break away from my desk :) sitting at a desk all day at work makes me less excited about doing it at night too lol. I think I have everything setup right on the server, but maybe im missing something... is there a guide anywhere, or some pointers? I'm tired of making changes on one machine and then sourcing them into the server.

Thank you,

trevius
08-11-2008, 07:34 AM
If your server and your laptop are both connecting via a router on the same LAN, then you don't need to forward port 3306. And you probably don't want to forward that port unless you have to, because it opens your database to possible security risks. You would only need to forward that port if you were wanting to access it remotely from outside of your LAN, like if you were at a hotel or work or something.

Most likely, all you need to do is to run the MySQL config setup again and make sure to check the box to allow remote connections. By default, that box isn't checked, so you have to change it if you want to connect remotely.

hayward6
08-11-2008, 08:10 AM
I'm pretty sure I changed it to allow because that was my plan, but I'll check it out. Can I just run through the instalation again? Thanks for the tip on port forwarding :)

hayward6
08-11-2008, 03:05 PM
I ended up reinstalling completely to make sure I got it, and it's still not working... I can access the http server from another pc on my network, but I cant seem to get root access to the database using any of the database tools like query or administrator. Maybe I need to setup another account, or grant access from another IP? actually, thats probably it! I need to grant access from the IP of my laptop... Is there a way to grant access to all using root?

trevius
08-11-2008, 04:24 PM
If your LAN is all on 192.168.1.x, then you should be able to use this in mysql to add an account that would work from anywhere on your LAN:

GRANT ALL PRIVILEGES ON *.* TO 'eqemu'@'192.168.1.%' IDENTIFIED BY 'my-new-password';

Of course, you need to replace "my-new-password" with whatever password you want for it.

hayward6
08-11-2008, 06:29 PM
you're the man! thanks a lot, working perfectly.