Trying to connect Drupal running from my localhost to a remote database but coming across issues.

I am using the following string in my settings.php file:

$db_url = 'mysqli://username:password@xx.xxx.xxx.xxx/database_name';

I am getting the following error:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\myapp\includes\database.mysqli.inc on line 115

What I am doing wrong?


Check connection to remote database:

$ telnet xx.xx.xx.xx 3306


$ mysql -u username -p -h xx.xx.xx.xx -D database_name

On remove server can be configured firewall or MySQL not listen to xx.xx.xx.xx address.

  • Thanks. I can successfully connect to the DB on remote host using MySQL Workbench. Only when I am trying to connect with Drupal it doesn't work. Any ideas. – April Feb 6 '11 at 22:45
  • change "mysqli" to "mysql" – alvosu Feb 6 '11 at 23:18

Increase the max execution time in your php.ini to see if this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.