使用 MySQL 连接报错

code: ‘ER_NOT_SUPPORTED_AUTH_MODE’,
errno: 1251,
sqlMessage:
‘Client does not support authentication protocol requested by server; consider upgrading MySQL client’,
sqlState: ‘08004’,

解决

workbench上输入(或者命令行):

alter user 'root'@'localhost' identified with mysql_native_password by '123456';