本地mysql无法登录,Navicat可以登录
由于在修改权限时把mysql.user表的plugin字段值由auth_sock改为mysql_native_password后,出现了问题,在网上查找了各种方法都没有解决,无奈之下,删除问题账户的数据,成功了
- 问题重现
$ mysql -uroot -p
Enter password:
ERROR 1524 (HY000): Plugin 'auth_sock' is not loaded
- Navicat登录mysql,查看mysql.user表,user为root的数据有两条
$ select host,user,plugin,authentication_string from mysql.user where user='root';
+-------------+------+-----------------------+-------------------------------------------+
| host | user | plugin | authentication_string |
+-------------+------+-----------------------+-------------------------------------------+
| % | root | mysql_native_password | *47B150E012313114C04A1C9336709424085B6BD0 |
| localhost | root | mysql_native_pa