Mysql Workbench | Laravel: Access denied for user ‘root’@’localhost’ in linux
1 min readApr 26, 2020
The reason for this error is because the mysql is using default unix or auth_socket plugin.
So we have change this to mysql_native_password
Step 1:
sudo mysql -u root -p
Enter password for sudo and root user
Step 2:
Use mysql;
Change to mysql database
Step 3:
Select User, Host, plugin from mysql.user;
This will show
Step 4:
Update user set plugin=’mysql_native_password’ where User=’root’;
Step 5:
systemctl restart mysql
Now try connecting from Mysql Workbench or Laravel and keep password empty.