SoFunction
Updated on 2025-04-14

Solutions to MySQL error codes 2058 and 2059

1. Pre-understanding

  • Error codes for 2058 and 2059coreAll of them are used by youClient Toolsandmysql versionofPassword pluginMismatch.
  • 2058 Generally, this error usually occurs when using the SQLyog client tool to connect to MySQL 5.7 and above.
  • 2059 Generally, this error usually occurs when using the Navicat client tool to connect to MySQL 8.0 and above.

2. Error phenomenon

  • 2058
Authentication plugin 'mysql_native_password' cannot be loaded
  • 2059
Authentication plugin 'caching_sha2_password' cannot be loaded

3. Solution (touch the key points!!!)

Modify the encryption rules of MySQL8! ! !

# Connect to mysql servermysql -u root -p
# Enter the mysql databasemysql> use mysql;
# View user tablemysql> select user,host from user;
# Set the login password to never expire (change password to your own)mysql> alter user 'root'@'localhost' identified by 'password' password expire never;
mysql> alter user 'root'@'%' identified by 'password' password expire never;
# Modify encryption rules (change password to your own)mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'password';
mysql> alter user 'root'@'%' identified with mysql_native_password by 'password';
# Refresh permissionsmysql> flush privileges;
# quitmysql> quit

This is the end of this article about the solutions to MySQL error codes 2058 and 2059. For more related contents of MySQL error codes 2058 and 2059, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!