Drupal 7 returning empty array because of the database connection I am able to connect to the remote database and fetch the results when I am using core PHP-MySQL connection.

But Drupal 7 returns empty array when I am using the same remote database connection. The local database is working fine.

Below is my database connection in settings.php

$databases['default']['default'] = array (
      'driver' =&gt; 'mysql',
      'database' =&gt; 'test',
      'username' =&gt; 'test',
      'password' =&gt; 'test',
      'host' =&gt; '*****',
      'port' =&gt; '3316',
      'prefix' =&gt; '',
);


When I am accessing my site, it is just returning Arrayas output. Is it a problem with my database user permissions or should I make any changes in Drupal database settings with port?
I resolved it. The problem is not in the database connection. I cleared the cache table in the database and it started working fine. 

Earlier, I set the option 'Cache pages for anonymous users'. May be because of this, it didn't give the output. 

Thanks for your answer.