title: Can't connect to MySQL databse of any webhost from anywhere other than the webhost itself
body: <p>I have 2 different webhost (<code>pagodabox</code> &amp; <code>000webhost</code>, both free) and I've set up a <code>localhost</code> with MySQL. </p>
  
  <p>I've installed wordpress on all three of them which work perfectly fine within their own domain -- ie. when <code>localhost</code> wordpress is using <code>localhost</code> database, <code>pagodabox</code> is using <code>pagodabox</code> database and so on.</p>
  
  <p>However if I change database access credentials from <code>wp-config.php</code> in order to, say, make <code>localhost</code> wordpress connect to <code>000webhost</code> database, it doesn't work: <strong><code>"Error establishing database"</code></strong>.      </p>
  
  <p>Here's the respective credentials I use:</p>
  
  <pre><code>&lt;?php
  
  wp-config.php - relevant differences
  
  * members.000webhost.com/panel/Manage MySQL Databases    
      // ** MySQL settings - You can get this info from your web host ** //    
      /** The name of the database for WordPress */    
      define('DB_NAME', '--------_db');    
      /** MySQL database username */    
      define('DB_USER', '--------');    
      /** MySQL database password */    
      define('DB_PASSWORD', '--------');    
      /** MySQL hostname */    
      define('DB_HOST', 'mysq--.000webhost.com');    
  
  * tunnel.pagodabox.com
      // ** MySQL settings - You can get this info from your web host ** //    
      /** The name of the database for WordPress */    
      define('DB_NAME', '--------_db');    
      /** MySQL database username */    
      define('DB_USER', '--------');    
      /** MySQL database password */    
      define('DB_PASSWORD', '--------');    
      /** MySQL hostname */    
      define('DB_HOST', 'tunnel.pagodabox.com');    
  
  * localhost    
      // ** MySQL settings - You can get this info from your web host ** //    
      /** The name of the database for WordPress */    
      define('DB_NAME', '--------_db');    
      /** MySQL database username */    
      define('DB_USER', '--------');    
      /** MySQL database password */    
      define('DB_PASSWORD', '--------');    
      /** MySQL hostname */    
      define('DB_HOST', 'localhost');    
  
  ?&gt;
  </code></pre>