MySql.Data.MySqlClient.MySqlException:“Authentication to host 'localhost' for user 'root' using m...

MySql.Data.MySqlClient.MySqlException:“Authentication to host 'localhost' for user 'root' using method 'caching_sha2_password' failed with message: Unknown database 'sys'”

修改加密规则

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; 
#更新密码(mysql_native_password模式)    
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '{NewPassword}';

你可能感兴趣的:(MySql.Data.MySqlClient.MySqlException:“Authentication to host 'localhost' for user 'root' using m...)