[Solved] Python Connet MYSQL Error: MySQL dB_exceptions.OperationalError: (2059, < NULL>).

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: