Spoolman
Spoolman copied to clipboard
Unable to connect to MySQL 8.x with default settings (Docker)
Describe the bug In MySQL 8.x the default authentication plugin has changed to "caching_sha2_password" which is a more secure hashing algorithm using SHA256. When trying to connect to a MySQL-Server with a user that has the new default auth plugin enabled, connection fails with the following error: RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods
To Reproduce
- Install or use an existing MySQL 8.x Server
- Create a user with default settings "CREATE USER spoolman IDENTIFIED BY 'secret'"
- Use this Server/User in the Spoolman Docker container
Expected behavior Spoolman should be able to connect to MySQL 8.x Server with default user settings and without compromising security.
Additional context Actually the solution to this problem is already included in the error message. PyMySQL needs the "crptography" package which is included when using PyMySQL[rsa] or aiomysql[rsa] but unfortunately not via SQLAlchemy. I think the problem can be solved by including any of the following dependencies:
- aiomysql[rsa]
- PyMySQL[rsa]
- cryptography
As I am not that familiar with python package management I can not decide which way would be the best and kindly ask for your help here.