MySQL 5.1.31 running on Windows XP.
From the local MySQL server (192.168.233.142) I can connect as root as follows:
>mysql --host
By default in MySQL server remote access is disabled. The process to provide a remote access to user is.
PATH
mysql -uroot -proot
(or whatever the root password is.)mysql>
GRANT ALL PRIVILEGES ON *.* TO 'username'@'IP' IDENTIFIED BY 'password';
Here IP is IP address for which you want to allow remote access, if we put %
any IP address can access remotely.
Example:
C:\Users\UserName> cd C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin
C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin>mysql -uroot -proot
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root';
Query OK, 0 rows affected (0.27 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.25 sec)
This for a other user.
mysql> GRANT ALL PRIVILEGES ON *.* TO 'testUser'@'%' IDENTIFIED BY 'testUser';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Hope this will help