PyMySQL / mysqlclient

MySQL/MariaDB connector for Python
https://mysqlclient.readthedocs.io/
GNU General Public License v2.0
2.45k stars 436 forks source link

Support `MYSQL_SERVER_PUBLIC_KEY` #682

Open methane opened 10 months ago

methane commented 10 months ago

https://dev.mysql.com/doc/c-api/8.0/en/mysql-options.html

MySQL 8.0.33 start deprecating mysql_native_password. Now caching_sha2_password is the default authentication plugin. When using caching_sha2_password in insecure transport (e.g. TCP without TLS), password must be encrypted with server public key. The safest way to use the server's public key is to use the MYSQL_SERVER_PUBLIC_KEY option.

MariaDB Connector/C supports MYSQL_SERVER_PUBLIC_KEY since they support sha256_password in 3.0.

taozuhong commented 2 months ago

MariaDB Connector/C have much more different with MySQL Connector/C, we should consider splitting it into two library now.