View Full Version : Connecting to MySQL on another computer
Digger3000
12-01-2006, 11:07 PM
This is probably something that's either really simple or simply impossible. My question is, if possible, how can I connect to mysql on another computer on my home network?
Digger3000
12-05-2006, 10:30 PM
I mean, from the computer I'm on now, how can I connect to the MySQL on another computer?
guelphdad
12-05-2006, 11:46 PM
you would have to install the mysql client on your other computer. and on the computer where you have your server you would have to allow connection to the appropriate port, I believe it is 3306.
Digger3000
12-05-2006, 11:54 PM
It is installed on the other computer. But how do I connect to it?
guelphdad
12-06-2006, 03:47 AM
what IP address do you use to connect to the second computer? (the one with the mysql server on).
you would create a mysql account on the machine with mysql client on it that has sufficient privileges to connect to the server. Check GRANT privileges in the mysql manual if you don't know how to do that. You would specify what hosts can connect and then create a user and other privileges.
you would then just make sure the server is running on the one machine and then start an instance of the client on the second machine and connect.
Digger3000
12-06-2006, 04:07 AM
Ok. I have MySQL running on both computer A and computer B. I use computer A, but I want to use computer B's MySQL from computer A. How do I connect?
Digger3000
12-07-2006, 01:47 AM
you would then just make sure the server is running on the one machine and then start an instance of the client on the second machine and connect.
Yes, but that's what I'm asking how to do.
guelphdad
12-07-2006, 02:08 AM
how do you start up a client now? Probably:
mysql -uxxxx -p*****
so to connect on another machine you must specify the host as well
mysql -uxxxx -h$$$$$ -p*****
you would substitute the values of $$$$ for whatever IP your second computer is connected with. You can try 192.168.1.1 but that might not be it. Right now you have to assign an address to your computers correct? then use the appropriate address as I've shown in the client start up above.
Digger3000
12-07-2006, 03:11 AM
Ok I'm connected. But what do -uxxxx and -p***** mean?
guelphdad
12-07-2006, 01:15 PM
u is username the xxxx are placeholders as are the ***** next to the p which is for password.
I figured those were obvious and you'd normally connect like that, the sticking point seemed to be you didn't know you needed the host in there.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.