Log in

View Full Version : mySQL connection error



jennizen
11-05-2009, 11:55 PM
I am so stupid that I created a new database via cPanel for my website and accidentally gave it the same username as the main database for my ecommerce database. Now I cannot login to my admin and my site doesn't come up. I get this error message

[CODE]Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'willowtr_jennic'@'localhost' (using password: YES) in /home/willowtr/public_html/include/db_mysql.php on line 47

There seems to have been a slight problem with the database. Please contact the server admin to report this problem.[CODE]

I have absolutely no idea how to fix this and I am so stressed out and crying. Please can someone help me. I deleted the new database I created but it has made no difference.

Please I need help so fast. Thank you.

Jenni

jennizen
11-06-2009, 12:31 AM
After an hour of stress and tears I resolved it. The new database had simply overwritten my password in config. These little things are sent to try us. Especially us idiots.

Thanks anyway,

Jenni

james438
11-06-2009, 01:49 AM
I have two different databases and both have the same username as the database name and they both work fine. They look something like:


$conn = mysql_connect("hostname", "john", "password") or die(mysql_error());
mysql_select_db("john",$conn) or die(mysql_error());

I might be misunderstanding though.