Solved

Cannot log into website using MySQL and PHP

Posted on 2016-09-22
8
44 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 17

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 14

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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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
 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

717 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