title: Enable remote connection to a MySQL database on Debian
body: <p>I have installed a MySQL database on a Debian Lenny 5.0 and I am trying to connect to that database remotely using PHP.</p>
  
  <p>This is the way I'm logging in:</p>
  
  <pre><code>$con = mysql_pconnect("MY_IP_ADDRESS","root","MY_PASSWORD");
  if (!$con)
  die('Could not connect: ' . mysql_error());
  </code></pre>
  
  <p>and this is the error I get: </p>
  
  <pre><code>Could not connect: Access denied for user 'root'@'li273-10.members.linode.com'
  (using password: YES)
  </code></pre>
  
  <p>Which <strong>Im not sure why my linode user appears there.</strong></p>
  
  <p>To enable remote connections I used this tutorial: <a href="http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html" rel="nofollow noreferrer">http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html</a></p>
  
  <p>Another thing I've noticed, in my phpmyadmin on the MySQL side I have this:</p>
  
  <pre><code>Server: localhost via TCP/IP
  Server version: 5.0.51a-24+lenny5
  Protocol version: 10
  User: root@mycooldb
  </code></pre>
  
  <p>Which I think that localhost has to be my server's IP Address?</p>
  
  <p>What I'm I doing wrong?</p>
  
  <p>Few thing that didnt work from the tutorial:</p>
  
  <p>Saving all rules: <code>service iptables save</code> doesn't work. I get this error:</p>
  
  <pre><code>-bash: service: command not found
  </code></pre>
  
  <p>Last, when I do mysql -u webadmin –h MY_IP –p I get this: <img src="https://i.stack.imgur.com/QH04A.jpg" alt="enter image description here"></p>