title: Access denied for user 'SYSTEM'@'localhost' (PHP 5.2.17 + mySQL 5.5.8 + Windows 7)
body: <p>I wanted to test a script written for PHP 5.3.5 (installed as Apache module) in PHP 5.2 environment.</p>
  
  <p>I installed a fresh copy of Apache 2.0.64 and PHP 5.2.17 and configured it EXACTLY as I had configured PHP 5.3 before. Except I did copy <code>libmysql.dll</code> into Apache bin directory (PHP 5.3 doesn't have this file anymore).</p>
  
  <p>Both servers are configured by hand (not a XAMPP versions or something) and access the same locally installed mySQL Server 5.5.8. Both servers are running as Windows Server under the system account.</p>
  
  <p>PHP 5.3 works perfectly, PHP 5.2 returns an error:</p>
  
  <pre><code>Warning: mysql_connect() [function.mysql-connect]: Access denied 
  for user 'SYSTEM'@'localhost' (using password: NO) in C:\Tools\htdocs\myscript.php on line 33
  </code></pre>
  
  <p>The SQL-user I am using is hardcoded in PHP code ant it is not <code>SYSTEM@localhost</code>. SYSTEM seems to be a Windows account the Apache is running under. (If I start the Apache from the Administrator account, the message changes to <code>Administrator@localhost</code>.)</p>
  
  <p>The default user (with a name '') was deleted on my SQL-Server. If this empty-user exists, the PHP 5.2 connects to the database successfully, but fails on the database selection (<code>mysql_select_db</code>) because of permissions.</p>