Connecting to mySQL remotely

fallenapples

In Runtime
Messages
386
Location
Toronto, Ontario
When connecting remotely to my mySQL database what do I need? The public i.p. address of the computer I'm on. Do I need to install a mySQL package, in this xampp or can I connect without it? How will it connect to my database if it doesn't have its network information, just the computer I'm trying to connect from?

Do I just go to cmd and type

#mysql -u username -p password -h public i.p of p.c. I am using
 
The CMD method you mentioned would only work if you have some kind of MySQL command line client installed on the machine.

Did you install PHPMyAdmin when you installed XAMP? If so, then you can connect to the PHPMyAdmin dashboard in a browser via:

<public IP>/phpmyadmin

It should then prompt you for a username/password. You'll also need to have your MySQL port forwarded on your router. The default is 3306
 
No, PHPMyAdmin should be on the server where MySQL is installed - you don't install it anywhere else. Is your "home computer" the computer you installed PHPMyAdmin/MySQL to?

THen you just have to access it via a web browser on any other computer via
http://<public IP>/phpmyadmin
 
Yes MySQL/xampp is installed on my home computer. I need to enter the public ip of the computer I am using or the computer MySQL is installed on?
 
Last edited:
Yes MySQL/xampp is installed on my home computer. I need to enter the public ip of the computer I am using or the computer MySQL is installed on?

No, you're misunderstanding me.

PHPMyAdmin (should be part of XAMPP), should be installed on your MySQL box.

You need to forward port 3306 on your router, to the static IP of your MySQL box.

On a remote machine (meaning any machine besides the one MySQL is installed on), open up a browser and type in:
http://<publicIP>/phpmyadmin

And it should prompt for a username/password. Type that in and you'll have access to your MySQL DB's. If you're not prompted for a password, then you'll need to setup a user. You may also have to setup a user account to be allowed to log in outside of your network. Should be under the "Users" section and then permissions.
 
Back
Top Bottom