I’m trying to log-in to MySQL server with PHPMyAdmin but it does not work,
I insert true username
and password
but it still doesn’t work and I don’t know what’s the reason
error:
mysql_real_connect(): (HY000/1045):Access denied for user
‘root’@’localhost'(using password YES) Connection for control user as
defined in your configuration failed
can’t enter to PHPMyAdmin
2
Answers
NEW Version of MYSQL does it this way.
In the new my-sql if the password is left empty while installing then it is based on the
auth_socket
plugin.The correct way is to login to
my-sql
with sudo privilege.Enter your database password and then updating the password using:
where
new-password
is your new database password or what you wantOnce this is done stop and start the mysql server.
Do comment for any doubt.
After completion of any
.env
edit, must be clear cache:php artisan config:cache
If you fixed everything and still have an error then stop XAMPP and restart Apache and MySQL server