When linking MySQL database through pycharm, the query report will give an error prompt:
RuntimeError: ‘cryptography’ package is required for sha256_password or caching_sha2_password auth methods
Method 1: restart MySQL
① As an administrator, enter the command line “net start MySQL 80” in CMD (the service name of MySQL 80 is different here according to the installed version) to start mysql
② Enter “MySQL” to enter mysql.
③ pycharm runs again without reporting an error.
Method 2: install the cryptography package
Error: runtimeerror: ‘cryptography’ package is required for sha256_ password or caching_ sha2_ password auth methods
The error message means: sha256_Password and caching_sha2_ Password two encryption methods require cryptography.
Therefore, you only need to install the cryptography package: PIP install cryptography
① First, if you see mysql running in task manager. ② After opening cmd, enter the command "pip install cryptography", after successful installation, run pycharm again, no error is reported.
Similar Posts:
- ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded
- [Solved] MYSQL Error: this authentication plugin is not supported
- [Solved] Scrapy Error: ERROR: Error downloading & RequestGenerationFailed
- [How to Solve] nodejs mysql ER_NOT_SUPPORTED_AUTH_MODE
- MYSQL 8.0 Login Error: caching_sha2_password [How to Solve]
- [Solved] Deploying Tomcat connection in Linux Navicat reports error 2059 – authentication plugin ‘caching_sha2_Password ‘cannot be loaded: + Xi input 9 g
- MySQL Connect Error: Authentication plugin ‘caching_sha2_password’ cannot be loaded
- How to solve the error of PHP connection to mysql8
- [Solved] SQLyog Connect MYSQL Error: 2058 plugin caching_sha2_password could not be loaded