PDA

View Full Version : Login/Logout Error


tahbikat
02-14-2014, 11:28 PM
Everytime I login or logout, this shows up:

SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)

The site still logs me in and out though. No idea what the above means!

IntoRain
02-14-2014, 11:48 PM
Go to /inc/config.php and check if the database information is correct (host/ database username / database password (these can be different from your site's name and password!) and check if that database user has all privileges in the database by going to MySQL Databases from the control panel)

tahbikat
02-15-2014, 12:43 AM
It's all right but it's still doing it. :/

I don't understand why. It was fine these past few days then suddenly it's doing it. Could it be something with the forum I installed?

It's not that big of a deal though as long as I can login still I guess. :P

Hall of Famer
02-15-2014, 04:40 AM
She means that when you created the database user for your database in your hosting cpanel, did you give all privileges to that database user? If not, you need to do that now.

tahbikat
02-15-2014, 08:06 AM
Yes I did. I made sure all privileges were checked yesterday. And my password is right.

Hall of Famer
02-15-2014, 08:09 AM
umm what exactly is in your config.php file? You can post its contents here with password censored, maybe something is wrong in that file.

tahbikat
02-15-2014, 08:22 AM
Could it be the config_forums.php file? I don't have anything in there. Am I supposed to input my database info there or leave it blank? If I'm supposed to input it, what would the mybbpath be? Not sure what that means. :P

Thanks guys! Sorry for being such a bother!

Kyttias
02-15-2014, 08:32 AM
Yes, you'll have to put database info in there. And I have $mybbpath = '/forum';
(User whatever your folder with your forum is called? That's mine.)

I remember having this error, too, but it was caused by other things, I think... and I can't remember how I solved it.

Hall of Famer
02-15-2014, 08:36 AM
I dont think its config_forums.php unless you have enabled MyBB forum integration. I am a bit confused now, did the error occur to you on the adoptables site or was it on your forum?

tahbikat
02-15-2014, 08:50 AM
Sorry for the confusion, it's occurring on site NOT forum. I just thought it could be something with the forum since it only started doing this after the forum was installed. Lol i don't know. :P

Here's a screenie: http://i.imgur.com/eDnMZcZ.jpg

Hall of Famer
02-15-2014, 08:54 AM
It does not look like anything is abnormal, maybe the database username has a typo in it? Note that the name is case-sensitive, Ruinily used to run into problems with her site when she mistakenly capitalized the first letter.

About your forum though, do you use MyBB forum integration? If so, maybe posting config_forums.php will help.

tahbikat
02-15-2014, 09:01 AM
In this error message:
SQLSTATE[HY000] [1045] Access denied for user 'gardenx10_tabith'@'localhost' (using password: YES)

It's leaving off the 'a' at the end of gardenx10_tabitha. Could that be why? I triple checked my username and database though and the 'a' is there.

And about the forums, yea I think so. I used the tutorial by Aasixx? :P I have the mybbenabled set to 1. I posted all my db information in there now. (Also thank you Kyttias for the help with that!)

Hall of Famer
02-15-2014, 09:07 AM
Interesting, its weird that the error message is missing the last 'a' character. Do you think you may have had a typo in config_forums.php?

tahbikat
02-15-2014, 09:19 AM
Oh! Yes! In the config_forums.php file I accidentally had a 10 instead of 1 for gardenx1_etcetc haha! Well I feel silly now. c:

Thanks for the assistance HoF! <3 It's working now!

Hall of Famer
02-15-2014, 09:21 AM
lol so that was the problem? Is your site fully functioning now? If so, congratulations. ^^

On the other hand I found that your site has 7 users but your forum has only 2, the forum integration may not work in this case. A quick fix is to set the auto_increment value in the two users tables from your adoptables and forum database to be the same value.

tahbikat
02-15-2014, 11:26 AM
Yea I noticed that. :/

I'm not sure how to do what you're saying though. Do I do this in the file manager and what files?