Sqlyog安装后连接mysql数据库,报错:2058.
这是密码算法更新导致的,解决如下:
1.打开cmd 连接数据库:
mysql -h localhost -P 3306 -u root -p123456
2.进入mysql依次执行下面语句
①修改加密规则(注意不要忘记写分号“;”)
alter user 'root'@'localhost' identified by 'root' password expire never;
②更新密码
alater user 'root'@'localhost' identified with mysql_native_password by 'root';
③刷新权限
flush privileges;
④密码改为新密码“Root123”
alter user 'root'@'localhost' identified by 'Root123';
然后再连接就没有问题了。