I have the Acquia Drupal profile installed. I've got the other installation parts of vBulletin configured correctly, but now I'm getting the following errors:

* warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'user'@'localhost' (using password: NO) in /home/user/public_html/modules/acquia/views/includes/handlers.inc on line 810.
* warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /home/user/public_html/modules/acquia/views/includes/handlers.inc on line 810.

My first thought is that the two applications are fighting over socket connections, but I'm not sure. Thoughts?

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide as much information about your site and server configuration as you can. In particular (but not limited to this), MySQL server version and Drupal's database settings as well as DrupalvB's database settings.

fmitchell’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks for your response.

I'm running Drupal 6.8 with the latest Acquia 1.1 install profile

MySQL version: 4.1.22
PHP: 5.2.3

Not sure what database settings you need, but they are connected via localhost on port 3306, two separate databases, but sharing the same users (from Drupal core).

Need any other info?

sun’s picture

Status: Active » Postponed (maintainer needs more info)

This sounds weird. Did you actually configure DrupalvB's database connection settings? The error message indicates that it cannot connect, or, that it failed to connect and failed to re-enable the default database connection afterwards.

fmitchell’s picture

Status: Postponed (maintainer needs more info) » Active

Yes, I configured the settings and I was able to sync the users and connect to the database.

That error message does indicate that, which is why I reported it as an error. The fact that it's happening in the views handler is also weird.

My question is are there other advanced settings (port connections, or port usage) that must be setup in addition to setting up vB? I mean, Drupal and vB are connecting to MySQL via 3306. Is there a point when they both attempt to connect simultaneously?

swellbow’s picture

This is a great module! Thanks so much.

I am also getting this error from the views handler. What's most strange about it is that everything still seems to be working anyway, so I think. I'm running Drupal 6.6 with php 5.2.6 and mysql 5.0.67. I also have all the vbulletin tables in my drupal database prefixed with vb_.

I was able to confirm that the error did not occur in views until I enabled the drupalvb module and set the database settings. I changed the connection settings in sites/all/modules/drupalvb/config.php (the copied vbulletin config php) and the vbulletin includes/config.php files to be a broken connection. The error still occurred (on pages other than the forums).

My guess then was that something in the drupalvb module was closing a connection so that later queries using "the default connection" were not correct. I commented out line 105 of drupalvb.inc (@mysql_close($connection);):

      case 'mysql':
        $connection = @mysql_connect($db['host'], $db['user'], $db['pass'], TRUE, 2);
        if ($connection && mysql_select_db(substr($db['path'], 1))) {
          $valid = TRUE;
        }
        //@mysql_close($connection);
        break;

The error vanished. I don't know what the ripple effect here is, but hopefully it helps to track things down.

Thanks again!

Kurt

sun’s picture

Very good idea. Of course, Drupal vB should not close Drupal's default database connection. I have to admit that this module was developed on sites that use different databases for Drupal and vB.

So, any takers?

szy’s picture

Priority: Normal » Critical

I'm getting similar errors, but commenting the line from #5 didn't help me.

warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'www-data'@'localhost' (using password: NO) in /includes/database.mysql.inc on line 44.
warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /includes/database.mysql.inc on line 44.
[...]
warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'www-data'@'localhost' (using password: NO) in /includes/database.mysql.inc on line 44.
warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /includes/database.mysql.inc on line 44.
warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'www-data'@'localhost' (using password: NO) in /modules/views/includes/handlers.inc on line 833.
warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /modules/views/includes/handlers.inc on line 833.
warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'www-data'@'localhost' (using password: NO) in /includes/database.mysql.inc on line 44.
warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /includes/database.mysql.inc on line 44.
[...]
warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'www-data'@'localhost' (using password: NO) in /includes/database.mysql.inc on line 44.
warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /includes/database.mysql.inc on line 44.

... on every page.

I don't have multiple databases configured, but I do have Domain module's settings.inc
included in settings.php - could it be a reason?

Szy.

szy’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
szy’s picture

As errors show up even for anonymous user, marking it critical... :/

Szy.

szy’s picture

Priority: Critical » Normal
Status: Active » Fixed

It must be my mistake writing comment #7 - commenting the line from #5
did fixed this problem. Sorry.

Szy.

sun’s picture

Priority: Normal » Critical
Status: Fixed » Active

Original issue is not fixed.

sun’s picture

Title: mysql_get_server_info() warnings » DrupalvB should not close Drupal's default database connection
Status: Active » Needs review
StatusFileSize
new1.5 KB

I wonder whether this patch might be sufficient.

szy’s picture

Why do I see this thread udpated almost every day? Are there
updates applied to the patch?

Szy.

sun’s picture

Unfortunately, just spammers.

Did you test the patch?

swellbow’s picture

This patch appears to work regarding my issue in #5. Not sure if it takes care of the original original issue, though I thought they were the same.

psicomante’s picture

I have the same problem. I'm trying this patch. I will see through the code if i find something (i will someday feel at ease with this great module!!)

sun’s picture

Status: Needs review » Fixed

Thanks for reporting, reviewing, and testing! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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

toma’s picture

I get the same problem, i am using the #5 comment and it fix, i receive no error! the last dev doesn't solve the problem

sun’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.13 KB

Possible. Can you try this patch?

sun’s picture

Status: Needs review » Fixed

Thanks for reporting, reviewing, and testing! Committed to D6.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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

stevensunsunsun’s picture

Moved to open bug.