Cannot log into website using MySQL and PHP

All of a sudden my websites don't work.  When trying to log in I get the following error:

Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'USERNAME'@'localhost' (using password: YES) in /home8/mysite/public_html/domain/verify.php on line 18
Unable to connect to database [Access denied for user 'USERNAME'@'localhost' (using password: YES)]

Bluehost has been no help.

Thoughts
Sheldon LivingstonConsultantAsked:
Who is Participating?
 
Sheldon LivingstonConnect With a Mentor ConsultantAuthor Commented:
I figured it out...

Something removed the admin user from 3 of the 4 databases.

I added the user back and it is working now.

3 of the databases were using the same user... the fourth database that was working was using a different admin user.
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
What's the code in verify.php? Are you sure your credentials are correct?
0
 
Chris HarteThaumaturgeCommented:
Check the database is running.
As Ferruccio Accalai asks, check your credentials.

Is this a 'localhost' machine? Because Bluehost do not sound local.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Andy MInternal Systems ManagerCommented:
I believe you should have a mysql admin option on your Bluehost control panel (can't remember the name of it at present).

See if you can log onto the database using the credentials in there - if not, ask Bluehost to confirm the correct details for the database.

if you can access it directly via mysql check the details between that and your coding in verify.php.
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
@All of a sudden my websites don't work.  When trying to log in I get the following error

Just in addition.
All of a sudden, so it was working before. Have you changed any code due to MySql version's upgrade? Are you using scripts coded for working with the last php and mysql versions but maybe BlueHost still works with older versions?
0
 
Sheldon LivingstonConsultantAuthor Commented:
The 3 websites all were working fine yesterday morning and yesterday night are failing.

No code has been changed... it fact I haven't worked on these sites in quite some time.

I have not changed credentials but suspect that something has.

I can get into the databases via phpMyAdmin.
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
SO you have to look into the code. Maybe there's no connection to the server or the most bad thing could be any hacking action
0
 
Sheldon LivingstonConsultantAuthor Commented:
Solved myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.