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.
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