Web Hosting Talk







View Full Version : Homepage Error Messages


DavidV
03-13-2004, 06:04 PM
Hello everyone. Please help me out!

I just finished backing up my site and now I'm getting the following error messages on my homepage. Any ideas?

Warning: mysql_connect(): Access denied for user: 'latins@localhost' (Using password: YES) in /home/latins/public_html/engine/lib/db.php on line 11

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/latins/public_html/engine/lib/db.php on line 12

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/latins/public_html/engine/lib/db.php on line 15

Rich2k
03-13-2004, 06:38 PM
Your login details are incorrect for your database. Either the database name, host, username or the password or any combination of those is incorrect. Any other SQL errors after that can just be ignored until you get your login details right.

DavidV
03-13-2004, 06:42 PM
Any idea why that would have changed though? I was in cPanel/Backup and then clicked on Generate/Download a Full Backup.
Haven't changed any login info or database names.

Here is what my db.php starts with

// DATABASE CONNECTION
function DBConnect() {
$mysql_link_id=mysql_connect(DB_HOST.":".DB_PORT, DB_USER, DB_PASSWORD);
if (mysql_select_db(DB_NAME, $mysql_link_id)) {
return $mysql_link_id;
} else {
errmess(mysql_error($dbh));
}
}

DavidV
03-14-2004, 01:46 AM
For some reason there's no connection to my db. Any ideas?

Brightadmin
03-18-2004, 06:27 AM
Hi,

Obviously, one of the variables set in config.php are wrong - either the database username or the database password - else your account has no access to the database you are trying to use.

If you are using cPanel, make sure you add that user to the Database. Creating a new DB user doesn't automatically add him to the database access.In your CPanel, click on MySQL. Also make sure (with cpanel) your database name INCLUDES your account name.

Like if you make a new db, and call it "vb". And lets say your Cpanel account name is "joeshmo".

Your database name is: joeshmo_vb
Same with username... (not password though!).

Hope now you can fix your bug .

Regards,

Bright
:)