SQLSTATE[HY000] [1045] Access denied for user ‘somthing’@’localhost’ (using password: YES) (SQL: select * from

Hey, are you facing this error : SQLSTATE[HY000] [1045] Access denied for user ‘libromart’@’localhost’ (using password: YES) (SQL: select * from ?

It’s okay,

You Can solve easily this problem.

for this problem SQLSTATE[HY000] [1045] Access denied for user comes some reasion.

This problem comes while local to host on live server

and sometime comes in Local server as well.

Now, look at for error, what is saying, SQLSTATE[HY000] [1045], it’s come form SQL, or SQL connection problem.

and Second is Access denied for user ‘somthing’@’localhost’ (using password: YES) (SQL: select * from, it mean, your provided user and password is not match.

how to solve this?

Go to your cPanel, and click on MySQL Database.

  1. check your database name
  2. check your user name
  3. change your user password
  4. update on the .env file

If you accessing on the localhost then

database name: check correctly database name

User: root

password: ‘ ‘

If you have changed user and password on local host on Laragon, Xampp and other then use what you are

Thanks.

6 thoughts on “SQLSTATE[HY000] [1045] Access denied for user ‘somthing’@’localhost’ (using password: YES) (SQL: select * from

  1. Balbikash Chaura

    Thanks, I solved after reading your content.

    Really useful, love it.

    1. Full Stack Developer

      You Are Welcome, keep learning.

  2. Shahoriar Fahim

    Thanks a lot. It works.

    1. Full Stack Developer

      that’s good.

  3. HAMMAD

    thanks it worked for me

    1. Full Stack Developer

      that’s great, You are welcome.

Leave a Reply