MySQL Plugin 'auth_socket' Loading Error
In this question, the user encountered the following error when attempting to log into MySQL using the CLI:
mysql "ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded"
This error indicates that the MySQL plugin responsible for socket authentication is not loaded. To resolve this issue, the user must:
Update the Auth Plugin:
While resetting the root password (step 2), the user must also modify the authentication plugin to "mysql_native_password":
use mysql; update user set authentication_string=PASSWORD("") where User='root'; update user set plugin="mysql_native_password" where User='root'; # THIS LINE flush privileges; quit;
Additional Considerations:
Full Code Solution:
Bash Commands:
sudo /etc/init.d/mysql stop sudo mysqld_safe --skip-grant-tables & mysql -uroot
MySQL Commands:
use mysql; update user set authentication_string=PASSWORD("") where User='root'; update user set plugin="mysql_native_password" where User='root'; flush privileges; quit;
Bash Commands (Continued):
sudo /etc/init.d/mysql stop sudo /etc/init.d/mysql start mysql -u root -p
The above is the detailed content of Why Am I Getting 'Plugin 'auth_socket' is Not Loaded' Error When Connecting to MySQL?. For more information, please follow other related articles on the PHP Chinese website!