解决:MySQL client, error code: 1251, SQLState: 08004

问题:

Client does not support authentication protocol requested by server; consider upgrading MySQL client, error code: 1251, SQLState: 08004

原因:

客户端不支持服务器(8.0默认)caching_sha2_password 方式的链接认证,强制使用:mysql_native_password 就可以解决。

修复:

-- Change authentication plugin for a user
ALTER USER 'your_username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';

-- Apply changes
FLUSH PRIVILEGES;

你可能感兴趣的:(Extension,mysql,数据库,服务器)