Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 07:23 pm EST

Geeklog Forums

mySQL error


Joe

Anonymous
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'skaterpg_user'@'localhost' (using password: YES) in /home/kewldude/public_html/class/class_db_mysql.php on line 46
FATAL ERROR: Could not connect to database on localhost (Access denied for user 'skaterpg_user'@'localhost' (using password: YES))

What can I do to fix this?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Check that you're using the correct username and password for your database.

bye, Dirk
 Quote

Joe

Anonymous
I check the mySQL and I have the correct everything but it has a different username and password then what this error is showing...
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Is this a cpanel webspace? cpanel requires a special setup with database an users which is not so obvious at first. You may checkout these tutorials:
http://www.siteground.com/tutorials/cpanel/mysql.htm
http://www.youtube.com/watch?v=rA4Uzs_VjGM

Or you could ask your hoster for help.
 Quote

Joe

Anonymous
The database is already added. But I still get this error. I have no idea what the problem is...Any ideas?
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Quote by: 1000ideen

Is this a cpanel webspace?

You need a database AND a user AND you must add the user to the database. Finally you must type the correct DBname and username and password. Double check this! If it doesn`t work, ask the hoster. There can also be a defect with the database.
 Quote

Joe

Anonymous
Well now I am getting this in the same code.

Parse error: syntax error, unexpected $end in /home/kewldude/public_html/class/class_db_mysql.php on line 178
 Quote

Joe

Anonymous
Ok here is the error:


Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'skaterpg_user'@'localhost' (using password: YES) in /home/kewldude/public_html/class/class_db_mysql.php on line 46
FATAL ERROR: Could not connect to database on localhost (Access denied for user 'skaterpg_user'@'localhost' (using password: YES))


Here is line 46:

$this->connection_id=mysql_connect($this->host, $this->user, $this->pass, 1) or $this->connection_error();
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
If you search this forum for expressions like mysql_connect or 'Could not connect to database' then you will see that quite a few people had this problem before. The answer is the one I gave you above Idea
 Quote

Joe

Anonymous
Wow I am an idiot. It wasnt the mySQL it was the config.php file -.-
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
I don`t know what you are doing - updating from an older version?
 Quote

Joe

Anonymous
Moving files. I forgot all about config.php it had the old user and pass in it cause a conflict with the current user and pass on the new cpanel.
 Quote

All times are EST. The time is now 07:23 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content