Kyle Emmanuel
Kyle Emmanuel

Reputation: 2221

Access denied for mysql, Laravel 5

I've configured a .env file just as stated in the tuts, but I still keep on getting SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES).

My credentials are correct as it would properly authenticate when I use MAMP's mysql via terminal.

Could anyone enlighten me on this? your knowledge would be greatly appreciated.

Upvotes: 1

Views: 176

Answers (1)

Deep Kakkar
Deep Kakkar

Reputation: 6305

You can use the terminal to revert any changes.

mysql -u root

UPDATE user SET password=PASSWORD(‘Enter Your New Password HERE’) WHERE user=”root”;

You might need to flush privilages,

FLUSH PRIVILEGES

Then just restart your MySQL server.

Note: As you are on local then no need to put any password. you can leave password as empty. Hope this helps.

Upvotes: 1

Related Questions