PDA

View Full Version : Cannot Connect Error


Fatmanacc
Tue 9th Jan '07, 4:13pm
Now that I have my installation script working fine I have run into another error.


Error description: mysql_connect() [function.mysql-connect (http://www.kurrupt.org/Forums/install/function.mysql-connect)]: Access denied for user 'nobody'@'localhost' (using password: NO) /home/fatman/public_html/Forums/includes/class_core.php on line 273
The database has failed to connect because you do not have permission to connect to the server. Please confirm the values entered in the 'includes/config.php' file.

I have read through your instructions and forums here to find this information bellow.

I keep getting 'The database has failed to connect' error.


This error means either:
One or more of the following is wrong in your config.php file:
$config['MasterServer']['servername'] (except in rare cases, this should almost always be left as 'localhost' or '127.0.0.1')
$config['MasterServer']['username']
$config['MasterServer']['password']
$config['Database']['dbname']

If you are unsure of what the appropriate values are then you will need to ask your web host.

NOTE: Please note that you can NOT use the config.php file from version 2.x or 3.0.x on a 3.5.0 forum.
Or that this db user is not assigned to that database or does not have permission to access MySQL to create or access a database. You may need to first manually create the database and assign the db user to it. Since each web host is different, if you do not know how to do this then contact your web host for help.
Or you are running MySQL 4.1.x. As of MySQL 4.1.X there is a new password hashing system. PHP4 does not have builtin support for it as of yet, however PHP5 does. In order for your old PHP4 MySQL clients to be able to connect to the MySQL 4.1.X database you need to set an OLD_PASSWORD. You should be able to run the following Query to make it possible for PHP4 to access the MySQL 4.1.X database.
SET PASSWORD FOR 'username'@'localhost' = OLD_PASSWORD('password');


More info is here:
http://dev.mysql.com/doc/mysql/en/password-hashing.html
http://dev.mysql.com/doc/mysql/en/upgrading-from-4-0.html
However, I have set all my information to the appropriate values.

$config['Database']['fatman_Board'] = 'forum';
$config['MasterServer']['localhost'] = 'localhost';
$config['MasterServer']['fatman_fatman'] = 'root';
$config['MasterServer']['My password here'] = '';

Obviously I filled in "My password here" with the password I created. These values are correct and I have triple checked them. I do suspect something is wrong with what I'm doing because it shows up as nobody@localhost and no password. However, I'm unsure what I'm doing wrong. Thanks for any help.

Regards

Allan Cousins

Steve Machol
Tue 9th Jan '07, 4:56pm
As per your support ticket you need to edit only the portion to the right of the equal sign and in between the single quotes.

SSSlippy
Tue 9th Jan '07, 5:03pm
That config u have setup is wrong. Open the new config.php.new file and rename it to config.php and then change the variables.

Steve beat me to it.

Fatmanacc
Tue 9th Jan '07, 7:24pm
Thank you for your replies. I now have the forums up and running. Your support has been great thus far and am really looking forward to my vBulliten board. Thanks guys.

Regards

Allan Cousins