title: Wordpress Multisite "Error establishing a database connection" in localhost
body: <p>When attempting to convert WordPress to a Multisite setup, I get the error:</p>
  
  <blockquote>
    <p>Error establishing a database connection</p>
  </blockquote>
  
  <p>I'm using WordPress 3.7.1 on Windows 7 with a WAMP server. </p>
  
  <h3>wp-config.php</h3>
  
  <pre><code>define('WP_ALLOW_MULTISITE', true ); 
  define('SUBDOMAIN_INSTALL', false); 
  define('DOMAIN_CURRENT_SITE', 'localhost');
  define('PATH_CURRENT_SITE', '/wordpress_test4/');
  define('SITE_ID_CURRENT_SITE', 1); 
  define('BLOG_ID_CURRENT_SITE', 1);
  </code></pre>
  
  <h3>.htaccess</h3>
  
  <pre><code>RewriteEngine On 
  RewriteBase /wordpress_test4/ 
  RewriteRule ^index\.php$ - [L]
  
  # add a trailing slash to /wp-admin 
  RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
  
  RewriteCond %{REQUEST_FILENAME} -f [OR] 
  RewriteCond %{REQUEST_FILENAME} -d 
  RewriteRule ^ - [L] 
  RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] 
  RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] 
  RewriteRule . index.php [L]
  </code></pre>