title: MySQL remote database server connect failed
body: <p>I am trying to connect <code>Cakephp 3.x</code> remote database server from my local machine.</p>
  
  <p><strong>But it showing below error</strong></p>
  
  <blockquote>
    <p>Error: SQLSTATE[HY000] [2002] No route to host  </p>
  </blockquote>
  
  <p><strong>My local database configuration in <code>app.php</code> is look like -</strong></p>
  
  <pre><code>'Datasources' =&gt; [
      'default' =&gt; [
          'className' =&gt; 'Cake\Database\Connection',
          'driver' =&gt; 'Cake\Database\Driver\Mysql',
          'persistent' =&gt; false,
          'host' =&gt; '192.168.1.19',
          /**
           * CakePHP will use the default DB port based on the driver selected
           * MySQL on MAMP uses port 8889, MAMP users will want to uncomment
           * the following line and set the port accordingly
           */
          'port' =&gt; '3306',
          'username' =&gt; 'remote_db_user',
          'password' =&gt; 'my_password',
          'database' =&gt; '********',
          'encoding' =&gt; 'utf8',
          'timezone' =&gt; 'UTC',
          'flags' =&gt; [],
          'cacheMetadata' =&gt; true,
          'log' =&gt; false,
       ],
       /*Other configs*/
  ]
  </code></pre>
  
  <p><strong>About the remote server :</strong> </p>
  
  <blockquote>
    <ul>
    <li><code>ping 192.168.1.19</code> is ok for this IP from my PC</li>
    <li>There is no name server for this <code>IP</code> address</li>
    </ul>
  </blockquote>
  
  <p>How can I resolve this problem?</p>