hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Homepage Error Messages
Reply

Forum Jump

Homepage Error Messages

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-13-2004, 06:04 PM
DavidV DavidV is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Posts: 83
Exclamation

Homepage Error Messages


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



Sponsored Links
  #2  
Old 03-13-2004, 06:38 PM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
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.

  #3  
Old 03-13-2004, 06:42 PM
DavidV DavidV is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Posts: 83
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));
}
}


Last edited by DavidV; 03-13-2004 at 06:53 PM.
Sponsored Links
  #4  
Old 03-14-2004, 01:46 AM
DavidV DavidV is offline
Junior Guru Wannabe
 
Join Date: Feb 2003
Posts: 83
Exclamation

For some reason there's no connection to my db. Any ideas?

  #5  
Old 03-18-2004, 06:27 AM
Brightadmin Brightadmin is offline
Web Hosting Master
 
Join Date: Feb 2004
Posts: 772
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

Reply

Related posts from TheWhir.com
Title Type Date Posted


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?