This page looks best with JavaScript enabled

How to Replace Auth Socket by Mysql Native Password

 ·  ☕ 1 min read  ·  ✍️ shibu

Initially, default mysql settings, comes with “auth_socket” plugin for root user.

In my case I was unable to login to phpmyadmin from web browser using root user

Login to mysql

To see which plugin used for specific user we need to login to our mysql from command line

1
sudo mysql -uroot

Plugin used for user in mysql

Once we login to mysql, we can view current used plugin for user, using following code

1
2
use mysql;
SELECT user,plugin,host FROM mysql.user;

Alter user for replacing auth_socket plugin by mysql_native_password

we can change user plugin using following code

1
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';

here I kept password empty string

thanks

Share on

Shibu Deb Polo
WRITTEN BY
shibu
Web Developer