title: Can't connect to MySQL database - PHP
body: <p>Quick question here, I'm new to web hosting and I'm just having a muck around to see what's what. I've created the following PHP document and hosted it on my free 000webhost domain:</p>
  
  <pre><code>&lt;?php 
  
  $mysql_host = "mysqlXX.000webhost.com"; 
  $mysql_database = "***********_people"; 
  $mysql_user = "*************_admin"; 
  $mysql_password = "******************"; 
  
  // Create connection 
  $con=mysqli_connect($mysql_host,$mysql_database,$mysql_user,$mysql_password); 
  
  // Check connection 
  if (mysqli_connect_errno($con)) 
    { 
    echo "Failed to connect to MySQL: " . mysqli_connect_error(); 
      } 
  ?&gt;
  </code></pre>
  
  <p>I have set up (hopefully correctly) a small table in my database with 3 fields:</p>
  
  <ol>
  <li>ID - No Null, auto-increment, integer, primary</li>
  <li>First Name - VarChar, Length 20</li>
  <li>Last Name - VarChar, Length 20</li>
  </ol>
  
  <p>And entered data for each one.
  When I open the file from my control panel, I get the following error:</p>
  
  <blockquote>
    <p>Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045):
    Access denied for user 'a4935911_people'@'10.1.1.45' (using password:
    YES) in /home/a4935911/public_html/MySQL+PHP.php on line 9</p>
  </blockquote>
  
  <p>AND</p>
  
  <blockquote>
    <p>Failed to connect to MySQL: Access denied for user
    'a4935911_people'@'10.1.1.45' (using password: YES)</p>
  </blockquote>
  
  <p>Any ideas, anyone? </p>