How to log with a diferent user in a MYSQL remote database? Here's what I've done:
Logged as root in the MYSQL:
'create user 'user'@'%' IDENTIFIED BY 'password';
'grant select on *.* to 'user'@'%';
Then I setted a PHP script which connection is this one:
$con = mysql_pconnect("xxx.xx.xxx.xxx","user","password");
$selected = mysql_select_db("database",$con);
Aaaand it isn't working: I'm using LAMP on a cloud server, by the way;
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on 'xxx.xx.xxx.xx' (10061) in D:\path\index.php on line 21
What am I doing wrong?
EDIT: Not a firewell issue;