Drupal allow connection to multiple databases. To do this the $db_url (in settings.php) variable can be defined as array, not as string as is in a common Drupal installation. When this occur the Drupal database connection string is hold by $db_url['default'] instead of $db_url.

Attached there is a patch to fix this issue for dbscripts.module. The patch it also use the PHP parse_url() function to extract the database settings instead using of preg_match().

CommentFileSizeAuthor
dbscripts.patch766 bytesclaudiu.cristea

Comments

claudiu.cristea’s picture

See: http://drupal.org/node/18429 to find how to connect to multiple databases.

ceardach’s picture

Version: 5.x-1.x-dev » 6.x-2.x-dev
hefox’s picture

Version: 6.x-2.x-dev » 5.x-1.x-dev
Status: Needs review » Active

http://drupalcode.org/viewvc/drupal/contributions/modules/dbscripts/dbsc...

Combined with #303200: connect string doesn't allow for blank mysql password

(Fixed in 6, needs backport to 5. I don't have any urges to do anything with 5... though I suspect the patch would be the same.)

hefox’s picture

Version: 5.x-1.x-dev » 6.x-2.x-dev
Status: Active » Fixed

Re-open and provide a patch if anyone wants this for 5.x-1.x; for now I'm not going to be touching 5.x-1.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.