caching sha2 password is not supported mysql

前端 未结 7 1768
梦如初夏
梦如初夏 2020-12-06 07:37

i\'m trying to get my python program to insert data into MySQL and i followed a guide however i keep getting the error below.

\"Authentication plugin \'{0}\'

相关标签:
7条回答
  • 2020-12-06 07:44

    I had the same problem

    "Authentication plugin '{0}' is not supported".format(plugin_name)) mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported"

    This happens because your Python connector does not support the authentication plugin caching_sha2_password and you need to update it. I fixed it by installing the correct Python connector from MySQL official site. Be sure to download the correct connector based on your operating system, MySQL version and the Python version you use.

    0 讨论(0)
  • 2020-12-06 07:46

    I was getting the exact same issue and tried to update the mysql-connector module with pip as suggested in the accepted answer, however that did not help. I realized that the problem might be related to my Anaconda environment, hence I tried using conda for updating my mysql-connector-python module.

    Finally I resolved this issue with the following command:

    conda install -c anaconda mysql-connector-python
    

    This seems to do what pip could not do, at least in my case. The link of the conda package is: https://anaconda.org/anaconda/mysql-connector-python

    0 讨论(0)
  • 2020-12-06 07:48

    Installs the drive for python3.

    python3 -m pip install mysql-connector-python

    Installs the drive for the default python preinstalled on your system by the manufacturer.

    python -m pip install mysql-connector-python
    
    0 讨论(0)
  • 2020-12-06 07:57

    Seems this package works for me: sudo pip install MySQL-connector-python

    0 讨论(0)
  • 2020-12-06 07:59

    MySQL 8.0 made caching_sha2_password the default authentication for new accounts, which requires updated connectors to be able to use it. Alternatively, you can change the account to use the native auth method (but that is less secure).

    0 讨论(0)
  • 2020-12-06 08:04

    I managed to fix this. In the end I was using a version of python in Anaconda which just wouldn't install version 8.0.11 of the python connector, I managed to get 8.0.11 installed on my vanilla python 3.6.5 using windows PowerShell (in admin privileges) and using pip install MySQL-connector-python (I think I also had to update pip from 9 to 10.

    0 讨论(0)
提交回复
热议问题