MySQL授权时报错 ERROR 1819怎么办
执行授权的时候报错如下:
mysql> grant select, insert,update on cus_ent5ddf7b0e.* to fin_user@'192.168.2.78';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
出现这个错误的原因是,在这个实例上没有fin_user@'192.168.2.78'这个用户,所以提示密码不符合规则
解决办法是带上密码:
grant select, insert,update on cus_ent5ddf7b0e.* to fin_user@'192.168.2.78' IDENTIFIED WITH mysql_native_password AS '*276BBE3917EAF78CDE6E350B01215FDEF8D06FA3';
这也体现了MySQL的灵活性,grant语句可以创建用户和赋权一次搞定。