If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > connect to server on another machine

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-02-08, 18:29
lmei007 lmei007 is offline
Registered User
 
Join Date: Jun 2008
Posts: 20
connect to server on another machine

I have two XP machines in the same network, saying 10.123.123.2 and 10.123.123.6.

I installed the MySQL (version 5.0.45) on 10.123.123.2. I have a mydb database on it. I have granted all privilege to the 'user1'@'10.123.123.6' on mydb. Everything works on that server machine. I can see all password, username and host from the user table of the system database.


Now I try to connect from 10.123.123.6 by issue the following command on the command line:

C:\Z_James\0_MyPro>mysql -h 10.123.123.2 -u user1 -puser1 mydb
ERROR 2003 (HY000): Can't connect to MySQL server on 10.123.123.2' (10060)

did I type that command wrong? I can ping the server machine. Please help.

thanks,
Reply With Quote
  #2 (permalink)  
Old 07-03-08, 10:25
lmei007 lmei007 is offline
Registered User
 
Join Date: Jun 2008
Posts: 20
Found the solution.

1. make sure the server is runing and the 3306 default port is open via "telnet hostname 3306". if you can get connection on your local machine, that means is open. If you cannot get connection from another machine, that means is NOT accessible from remote machine.

2. Make an exception for that port on your firewall AND you can specify the remote machine ip to not allow other machines come in.

3. the command to connect from remote machine is the same: mysql -h hostname -uuserName -p
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On