I configured my server and allowed my IP to connect remotely.
I entered IP of the server, username and password of mysql user in SQLyog (a GUI for managing mysql server). It connects successfully to database and I can manage everything.
I also have a PHP script to connect to the database. the code is something like this:
mysql_connect('xx.xx.xx.xx', 'mysql_user', 'pass') or dir(mysql_error());
It displays this error:
Why Sqlyog can connect and PHP script can't?
Access denied for user 'mysql_user'@'yy.yy.yy.yy' (using password: YES) in /home/.../mysql.inc.php on line 9
I think it's because 'yy.yy.yy.yy' in username. but I can't force PHP not to use it.