How did I fix «Plugin 'auth_socket' is not loaded» for MySQL?

2024-02-22--10-15-55

Step 1

service mysql stop
mkdir -p /var/run/mysqld
chown mysql:mysql /var/run/mysqld
mysqld_safe --skip-grant-tables --skip-syslog --skip-networking

Step 2

Open a new terminal.

2.1

mysql -u root
use mysql;

2.2

update user set plugin="mysql_native_password" where User='root';
flush privileges;

2.3

\q

2024-02-22--10-26-31

stackoverflow.com/a/37879449

Step 3

Stop mysqld_safe.

Step 4

service mysql start