снимаем силу пароля
SHOW VARIABLES LIKE 'validate_password%';
SET GLOBAL validate_password.policy=LOW;
[mysqld]
validate_password.policy=LOW
снимаем вход через сокет. будет без пароля.
sudo mysql -u root # I had to use «sudo» since it was a new installation
mysql> USE mysql;
mysql> SELECT User, Host, plugin FROM mysql.user;
+——————+————————+
| User | plugin |
+——————+————————+
| root | auth_socket |
| mysql.sys | mysql_native_password |
| debian-sys-maint | mysql_native_password |
+——————+————————+
sudo mysql -u root # I had to use «sudo» since it was a new installation
mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;
sudo service mysql restart
Оставьте свой отзыв