title: SET NAMES command fails with access denied
body: <p>I'm trying to insert an accented <code>e</code> into a mysql database following <a href="http://xaviesteve.com/1223/issues-with-accents-and-strange-characters-in-php-mysql-solved/" rel="nofollow noreferrer">this example</a>. Using this:</p>
  
  <pre><code>mysql_query("SET NAMES 'utf8'");
  </code></pre>
  
  <p>throws:</p>
  
  <blockquote>
    <p>Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost'</p>
  </blockquote>
  
  <p>Its not connecting to the database:</p>
  
  <pre><code>DEFINE ('DB_USER', 'user');
  DEFINE ('DB_PASSWORD', 'pword');
  DEFINE ('DB_HOST', 'localhost');
  DEFINE ('DB_NAME', 'test1');
  $dbc = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
  </code></pre>