SQLyog连接MySQL8.0+报错:错误号码2058的解决方案

  mysql> show variables like 'default_authentication_plugin';

  +-------------------------------+-----------------------+

  | Variable_name | Value |

  +-------------------------------+-----------------------+

  | default_authentication_plugin | mysql_native_password |

  +-------------------------------+-----------------------+

  1 row in set (0.01 sec)

  mysql> CREATE USER 'sqlyog'@'%' IDENTIFIED BY '1234qwer';

  Query OK, 0 rows affected (0.04 sec)

  mysql> GRANT ALL PRIVILEGES ON *.* TO 'sqlyog'@'%';

  Query OK, 0 rows affected (0.02 sec)

  mysql> FLUSH PRIVILEGES;

  Query OK, 0 rows affected (0.01 sec)

  mysql> SELECT user,host,plugin FROM mysql.user;

  +------------------+-----------+-----------------------+

  | user | host | plugin |

  +------------------+-----------+-----------------------+

  | root | % | caching_sha2_password |

  | sqlyog | % | mysql_native_password |

  | mysql.infoschema | localhost | caching_sha2_password |

  | mysql.session | localhost | caching_sha2_password |

  | mysql.sys | localhost | caching_sha2_password |

  | root | localhost | caching_sha2_password |

  +------------------+-----------+-----------------------+

  6 rows in set (0.00 sec)