• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 47
  • Last Modified:

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
0
classnet
Asked:
classnet
1 Solution
 
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
 
Andy MIT 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
classnetAuthor 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
 
classnetAuthor 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
 
classnetAuthor Commented:
Solved myself
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now