1、mysql连数据库的时候报错:
1251 client does not support authentication protocol requested by server;consider upgrading Mysql client ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
mysql> use mysql; mysql> select user,host from user; +------------------+-----------+ | user | host | +------------------+-----------+ | root | % | | admin | localhost | | mysql.infoschema | localhost | | mysql.session | localhost | | mysql.sys | localhost | | zhangj | localhost | +------------------+-----------+
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123';
2、mysql登录报错1449
1449-The user specified as a definer(‘mysql.infoschema’@localhost’) does not exist
现象:
视图定义者不存在
解决办法:
flush privileges; //刷新权限 create user `mysql.infoschema`@"localhost" identified by 'h102'; flush privileges;
再次登录会报错,提示没有权限
ERROR 1356 (HY000): View ‘information_schema. SCHEMATA’…
use mysql; update user set Select_priv = 'Y' where User = 'mysql.infoschema'; //这里注意用户名,也是你报错的用户名 flush privileges;