title: Can't access mySQL remotely with PHP, how to fix?
body: <p>So I have mySQL installed on Ubuntu and I'm trying to access it with PHP.</p>
  
  <p>As long as I'm in Ubuntu, I can access mySQL from the command line without any issues. However, with PHP, I can only connect to mySQL. Once in, though, it refuses to let me select a database. I've enabled all permissions to the user alias that I'm connecting with, and even allowed remote access to the database.</p>
  
  <p>As root, PHP shows the following error:</p>
  
  <pre><code>(1049) Unknown database 'my_database'
  </code></pre>
  
  <p>As the user alias I use (called 'default'), PHP shows a different error:</p>
  
  <pre><code>(1044) Access denied for user 'default'@'localhost' to database 'my_database'
  </code></pre>
  
  <p>What am I missing? This never happened until I upgraded to Ubuntu 10.11.</p>