About the point that python 3.x got stuck due to an error due to caching_sha2_password

environment

Status

I tried connecting with MySQL using python3. But

I got an error saying that I couldn't proceed.

With python 2.7.16, it worked with reference to this, but https://qiita.com/yusuke_dev/items/7f0ca12ced72363f9448

Conclusion

import mysql.connector as mydb
    conn = mydb.connect(
      host=_host,
      port=_port,
      user=_user,
      password=_passwd,
      database=_dbname,
      auth_plugin='mysql_native_password'
    )

By putting ```auth_plugin ='mysql_native_password'`` `in the connect function, it also worked in python 3.8.0.

Recommended Posts

About the point that python 3.x got stuck due to an error due to caching_sha2_password
I got an error that Python couldn't read settings.ini
A story that got stuck when trying to upgrade the Python version on GCE
Fabric became unusable due to an error → Improved after changing the version
[Python] I want to know the variables in the function when an error occurs!
Is pyenv broken? Python 3.x references 2.x module at startup due to PYTHONPATH error
About the matter that was worried about sampling error
Excel X Python The fastest way to work
[Algorithm x Python] How to use the list
[Blender x Python] How to make an animation
An article summarizing the pitfalls addicted to python
What to do if the print command itself causes an error in Maya python
Think about how to program Python on the iPad
When I tried to introduce python3 to atom, I got stuck
[Blender x Python] How to create an original object
Error due to conflict between python when using gurobi
Collect tweets about "Corona" with python and automatically detect words that became a hot topic due to the influence of "Corona"
About the process that the Linux kernel handles x86 microcode
I felt that I ported the Python code to C ++ 98.
Mezzanine introduction memo that I got stuck in the flow
I got an error in vim and zsh in Python 3.7 series
An introduction to Python that even monkeys can understand (Part 3)
An introduction to Python that even monkeys can understand (Part 1)
An introduction to Python that even monkeys can understand (Part 2)
I got an error when I tried to process luigi in parallel on windows, but the solution
A story about a person who uses Python addicted to the judgment of an empty JavaScript dictionary
About the error I encountered when trying to use Adafruit_DHT from Python on a Raspberry Pi
[Python] About creating a tool to create a new Outlook email based on the data of the JSON file and the part that got caught