Solved

Cannot log into website using MySQL and PHP

Posted on 2016-09-22
8
19 Views
Last Modified: 2016-09-30
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
Comment
Question by:classnet
8 Comments
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 41810586
What's the code in verify.php? Are you sure your credentials are correct?
0
 
LVL 16

Expert Comment

by:Chris Harte
ID: 41810595
Check the database is running.
As Ferruccio Accalai asks, check your credentials.

Is this a 'localhost' machine? Because Bluehost do not sound local.
0
 
LVL 13

Expert Comment

by:Andy M
ID: 41810610
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
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 41810697
@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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:classnet
ID: 41810736
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
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 41810753
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
 

Accepted Solution

by:
classnet earned 0 total points
ID: 41810819
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
 

Author Closing Comment

by:classnet
ID: 41823169
Solved myself
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now