Use the MySQL monitor to insert a new row into the host and user tables as follows.
1. Log in and start the MySQL monitor with this command:
/usr/local/mysql/bin/mysql
2. Run this command:
mysql> use mysql;
3. Add the user's host IP address to the host table:
mysql> INSERT INTO host VALUES
('[HOST_IP_ADDRESS]','%','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
Replace [HOST_IP_ADDRESS] with the I.P. of the location you want to be able to connect from.
4. Add the user's IP address, user ID, and password to the user table:
mysql> INSERT INTO user VALUES
('[HOST_IP_ADDRESS]','[USER]',PASSWORD('[PASSWORD]'),
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
Replace [HOST_IP_ADDRESS] with the same I.P. from above, [PASSWORD] with your password, and [USER] with your username.
5. Restart MySQL