title: MySQLi & mysql_real_escape_string() Errors
body: <p>I am using OOP MySQLi to connect to my database. I have checked my credentials and everything is good to go.</p>
  
  <pre><code>    $mysqli = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB) or die('There was a problem connecting to the database.');
  
      if (mysqli_connect_errno()) { 
         printf("Can't connect to MySQL Server. Errorcode: %s\n", mysqli_connect_error()); 
         exit; 
      }
  
      if ($result = $mysqli-&gt;query('SELECT * FROM places WHERE place_id=' . mysql_real_escape_string($_GET['id']))) { 
          while( $row = $result-&gt;fetch_assoc() ){ 
              printf("%s (%s)\n", $row['name'], $row['place_id']); 
          } 
          $result-&gt;close(); 
      } 
  
      $mysqli-&gt;close();
  </code></pre>
  
  <p>This code is generating a error:</p>
  
  <pre><code>Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access
  denied for user '-removed-'@'localhost' (using password: NO) in
  /var/www/vhosts/communr.com/httpdocs/pbd/places.php on line 396
  
  Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to
  the server could not be established in
  /var/www/vhosts/communr.com/httpdocs/pbd/places.php on line 396
  </code></pre>
  
  <p>I can't figure out why I am getting these errors. They started showing when I moved servers recently. I am establishing an SQL connection before the query.</p>
  
  <p>Do you all think some setting could be messed up on my new server?</p>
  
  <p>Thanks!</p>