Make sure you take a look at your Windows Firewall. Port 3306 needs to be open at all times. Also, try to double check permissions on the database using this:
grant all priviliges on 'database'.'*' to 'username'@'remote_machine_ip' identified by 'password';
grant all priviliges on 'database'.'*' to 'username'@'remote_machine_ip' identified by 'password';