title: Logging with a user in a remote MySQL database
body: <p>How to log with a diferent user in a MYSQL remote database?
  Here's what I've done:</p>
  
  <p>Logged as root in the MYSQL:</p>
  
  <pre><code>'create user 'user'@'%' IDENTIFIED BY 'password';
  'grant select on *.* to 'user'@'%';
  </code></pre>
  
  <p>Then I setted a PHP script which connection is this one:</p>
  
  <pre><code>$con = mysql_pconnect("xxx.xx.xxx.xxx","user","password");
  $selected = mysql_select_db("database",$con);
  </code></pre>
  
  <p>Aaaand it isn't working:
  I'm using LAMP on a cloud server, by the way;</p>
  
  <pre><code>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
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>EDIT: Not a firewell issue;</p>