PDA

View Full Version : Error connection on vBulletin


ghisirds
07-31-2008, 05:15 PM
Hallo
Some week ago I changed my vBullettin hosting for a bigger one with the PHP more updated.
Everything works but at the beginning I received, an email with a database connection error that slowly diseappeared.

In these day it has started again to send me this error messages; I copy the text here below:

vBulletin Database Error!

Database error in vBulletin :

mysql_connect(): Host '213-215-228-XXX.hosting.net' is not allowed to connect to this MySQL server
/var/www/vhosts/dominio.estensione/httpdocs/includes/class_core.php on line 274

MySQL Error :
Error Number :
Date : Friday, July 18th 2008 @ 04:57:19 PM
Script : http ://dominio.estensione/1583-post17.html
Referrer :
IP Address : 72.36.115.XXX
Username :
Classname : vb_database

I have asked to the Hosting the reason of this error and he answered that the server has no problem and even mysql server works correctly.

He says that the problem seems to come from the fact that the application tries to connect to db on 213.215.228.XXX (old server?) and being another server is correct that it dosn't allows the connection.

He suggest to verify that all the Db connection are to "localhost" and not to external DB and he concludes saying that it is surely a problem of my configuration.

vBullettin is updated to 3.6.8 Patch Level 1 version and vBSEO 3.0.0. is installed.

Anyone has an Idea to help me solve the problem?

Thank you very much


__________________
You have never see gift ideas (http://www.giftideashop.net/) like these? (idee regalo (http://www.idee-regalo.biz/) on italian, geschenkideen (http://www.geschenk-ideen.biz/) on german or id?e cadeau (http://www.ideescadeauxoriginaux.com/) on french)

Lynne
07-31-2008, 06:00 PM
Did you do as your host suggested here (look at the user table in your mysql database)?
He suggest to verify that all the Db connection are to "localhost" and not to external DB and he concludes saying that it is surely a problem of my configuration.

Dismounted
08-01-2008, 06:11 AM
In config.php, set the MySQL server to "localhost".

ghisirds
08-01-2008, 07:07 AM
Interesting!
Then, I go to try.
Meanwhile thanks.
Bye bye

ghisirds
08-02-2008, 07:33 AM
So, I looked for in file config.php (inside include folder) the entry that can be like the error's one and I found this:

// ****** MASTER DATABASE SERVER NAME AND PORT ******
// This is the hostname or IP address and port of the database server.
// If you are unsure of what to put here, leave the default values.
$config['MasterServer']['servername'] = '213.215.228.XXX;
$config['MasterServer']['port'] = 3306;

Really the xxx of the number 213.215.228.XXX hide digits but are not the same as the ones reported in the error.
I have tried to substitute the file in this way and to upload again on the server:

// ****** MASTER DATABASE SERVER NAME AND PORT ******
// This is the hostname or IP address and port of the database server.
// If you are unsure of what to put here, leave the default values.
$config['MasterServer']['servername'] = 'localhost';
$config['MasterServer']['port'] = 3306;

But the problem is that the error stay, even if different...!!

Database error in vBulletin :

mysql_connect(): Access denied for user 'pippo'@'localhost' (using password: YES)
/var/www/vhosts/dominio.estensione/httpdocs/includes/class_core.php on line 274

MySQL Error :
Error Number :
Date : Friday, August 1st 2008 @ 04:46:23 PM
Script : http ://dominio.estensione/tags/romano/
Referrer :
IP Address : 72.36.115.XXX
Username :
Classname : vb_database

How can I solve it?
Thak you very much

Marco van Herwaarden
08-02-2008, 08:01 AM
Make sure that you enter the correct MySQL user and password for the new server in the config.php.

ghisirds
08-03-2008, 06:56 AM
I've checked the config.php configuration and everything seems ok but the
error stay; I don't know what to do now!!!

I tried to open the file too:
/var/www/vhosts/dominio.estensione/httpdocs/includes/class_core.php on line 274

and at line 724 (that the error report) I found this code:
$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);

Could it be useful to understand where and how operating?

Thank you

Dismounted
08-03-2008, 07:47 AM
The error (the one you posted in post #5) indicates that your MySQL username/password combination is not correct. Make sure they are correct and that the user has permissions to access the vBulletin database.

ghisirds
08-07-2008, 01:14 PM
Great, I've fixed it!!!

After a lot of trouble and reading again the vBulletin manual I've found an incoherence in config.php file.

It's in this section:

// ****** MASTER DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$config['MasterServer']['username'] = 'root';
$config['MasterServer']['password'] = '';

The last two lines were duplicated, the first with a wrong username.

I can't understand how it can be happened but removing that 2 lines the error doesn't appear anymore.

Thanks to everybody.

Bye