Рубрики
sql - mysql - postgres

MySQL fails on: mysql “ERROR 1524 (HY000): Plugin ‘auth_socket’ is not loaded”

Ссылки

https://ru.stackoverflow.com/questions/552936/%D0%9E%D1%88%D0%B8%D0%B1%D0%BA%D0%B0-%D0%B2-phpmyadmin-access-denied-for-user
https://stackoverflow.com/questions/37879448/mysql-fails-on-mysql-error-1524-hy000-plugin-auth-socket-is-not-loaded
https://toster.ru/q/389804
https://toster.ru/q/448897
http://qaru.site/questions/32547/mysql-fails-on-mysql-error-1524-hy000-plugin-authsocket-is-not-loaded

Решение:

1. first, run these bash commands
sudo /etc/init.d/mysql stop # stop mysql service
sudo mysqld_safe --skip-grant-tables & # start mysql without password
# enter -> go
mysql -uroot # connect to mysql

2. then run mysql commands => copy paste this to cli manually
use mysql; # use mysql table
update user set authentication_string=PASSWORD("") where User='root'; # update password to nothing
update user set plugin="mysql_native_password" where User='root'; # set password resolving to default mechanism for root user

flush privileges;
quit;

3. run more bash commands
sudo /etc/init.d/mysql stop 
sudo /etc/init.d/mysql start # reset mysql
# try login to database, just press enter at password prompt because your password is now blank
mysql -u root -p