1、flush privileges
flush privileges 是MySQL数据库中的一条语句,用于重新加载权限表,使最新的授权更改生效。执行该语句后,数据库将重新读取授权表中的内容,确保用户的新授权生效。
当报错: # Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol时,
在设置完密码:
alter user 'root'@'localhost' identified with mysql_native_password by '123456';后,
记得加: flush privileges 才行。