以下,我安装的5.7中user表中用户的plugin字段的值为空,致使包括root用户在内的账号都没法正常登陆,即便修改密码也不行。改正方法下边也有所说起。mysql
2016-11-07T02:03:11.759300Z 0 [Warning] User entry 'root'@'localhost' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
2016-11-07T02:03:11.759332Z 0 [Warning] User entry 'root'@'luyunstaff007-b85m-hd3' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
2016-11-07T02:03:11.759349Z 0 [Warning] User entry 'root'@'127.0.0.1' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
2016-11-07T02:03:11.759364Z 0 [Warning] User entry 'root'@'::1' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
2016-11-07T02:03:11.759415Z 0 [Warning] User entry 'root'@'%' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
2016-11-07T02:03:11.759431Z 0 [Warning] Some of the user accounts with SUPER privileges were disabled because of empty mysql.user.plugin value. If you are upgrading from MySQL 5.6 to MySQL 5.7 it means we were not able to substitute for empty plugin column. Probably because of pre 4.1 password hash. If your account is disabled you will need to:sql
修改方法:
2016-11-07T02:03:11.759470Z 0 [Warning] 1. Stop the server and restart it with --skip-grant-tables.
2016-11-07T02:03:11.759495Z 0 [Warning] 2. Run mysql_upgrade.
2016-11-07T02:03:11.759515Z 0 [Warning] 3. Restart the server with the parameters you normally use.
2016-11-07T02:03:11.759536Z 0 [Warning] For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manualthis
运行了mysql_upgrade。 plugin字段依旧为空。坑rest
所以作了第一步后,登陆进去。而后执行:update user set plugin='mysql_native_password';orm
使全部用户的plugin字段不为空便可,若是要改密码则按网上常见的方法:server
update mysql.user set authentication_string=password('weer') where User='root' and Host = 'localhost';ip
最后正常启动mysql便可登陆string