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?

link|improve this question

feedback

2 Answers

up vote 0 down vote accepted

Check connection to remote database:

$ telnet xx.xx.xx.xx 3306

or

$ 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.

link|improve this answer
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
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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