title: Accessing permissions in phpMyAdmin on a web hosting service
body: <p>I created a website with a database inside it using 000webhost.com. Now, I am trying to post 2 queries: one to add fields and one to retrieve all data from the database.  I already have the first query (to add), but when I try to make the second, I am getting the following error:</p>
  
  <blockquote>
    <p><b>Warning</b>:  mysql_query() [function.mysql-query]: Access denied for user 'a7172693'@'localhost' (using password: NO) in <b>/home/a7172693/public_html/retrieve.php</b> on line <b>11</b></p>
  </blockquote>
  
  <p>My PHP code for the query is as follows (secret info are replaced by hyphens):</p>
  
  <pre><code>&lt;?php
  header('content-type:application/JSON');
  
  $mysqli = new mysqli('---------------------', '-------------', '--------', '-------------');
  
  if (mysqli_connect_errno()) {
      printf("Connect failed: %s\n", mysqli_connect_error());
      exit();
  }
  
  $result = mysql_query('SELECT * FROM TableName');
  
  echo json_encode(mysql_fetch_assoc($result));
  ?&gt;
  </code></pre>
  
  <p>Now, this code is supposed to just return an array containing all of the fields and all that stuff, but it's giving me that warning above.  </p>
  
  <p>If anyone could just give me a clue on what's wrong here, it would be great.</p>