When Python connects to MySQL data:
an error message will prompt MySQL dB_exceptions.OperationalError: (2059, < NULL>)。
Python package:
mysqlclient
Analysis reason:
mysql8.0 provides a new authentication encryption method, caching_sha2_Password, it is recommended to update to the latest connector and client. However, it also provides another option, that is, to use the encryption method MySQL of the previous version_native_password。 One of the solutions to mysqlexceptions.operationalerror: (2059, null):
Solution
modify the password and use MySQL instead_native_Password encryption method. After flush privileges
Similar Posts:
- MySQL Connect Error: Authentication plugin ‘caching_sha2_password’ cannot be loaded
- [Solved] Deploying Tomcat connection in Linux Navicat reports error 2059 – authentication plugin ‘caching_sha2_Password ‘cannot be loaded: + Xi input 9 g
- [Solved] MYSQL Error: django.db.utils.OperationalError: (1045:Access denied for user ‘root’@’localhost’ (using password: NO)
- [Solved] MYSQL ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
- MYSQL 8.0 Login Error: caching_sha2_password [How to Solve]
- How to solve the error of PHP connection to mysql8
- Error in connecting to MySQL via Navicat on MAC
- [Solved] MYSQL Error: this authentication plugin is not supported
- java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password‘
- [Solved] Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by serv