Jump to content

Fatal Error: Access denied for user


Recommended Posts

So I installed Cubecart V6 and it was working swimmingly. I decided to add a plugin which required my dbpassword. I went in and manually changed my DBpassword through The Control Panel on my host Hostmonster's site. I then went into global.inc.php and made sure the values matched. I was immediately met with this error on all pages of the store.

 

Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'XXXX'@'XXXXX' (using password: YES) in /home7/westsale/public_html/shop/classes/db/mysqli.class.php on line 30

Fatal error: Access denied for user 'XXXXX'@'XXXXX' (using password: YES) in /home7/westsale/public_html/shop/classes/db/mysqli.class.php on line 32

 

The XXX's use to be my hostname and dbusername both written out in full.

 

I have found a couple topics on this exact issue, but most dead-end or solutions are not posted within the discussion. It seems as though me manually changing the pass is the main culprit but I don't have the knowledge to track down and figure out why the site would then act this way.

Link to comment
Share on other sites

I tinkered around with it and found out: Changing the permissions on the global.inc.php file to 755 and changing dbhost to 'localhost'. That seemed to resolve the issue, I hope this helps anybody who has the issue like I did. Feel free to lock or delete this if I'm breaking any rules.

Link to comment
Share on other sites

Welcome Alecrein! Glad to see you made it to the forums.

CubeCart does not "cache" database access credentials. If you change them in global.inc.php, CubeCart will be using those credentials from that point forward.

"I decided to add a plugin which required my dbpassword."

A plugin requiring the database password is incredibly suspicious. Incredibly suspicious!

What were the permissions on global.inc.php until you changed them?

Link to comment
Share on other sites

"I decided to add a plugin which required my dbpassword."

A plugin requiring the database password is incredibly suspicious. Incredibly suspicious!

What were the permissions on global.inc.php until you changed them?

​I would agree that any "plugin" that requires you to enter DB details again is either extremely poorly written or more probably highly suspicious.

755 for the permissions on the global.inc.php file are also completely wrong and this would not have "solved" this problem

Ian

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...