mysql connector errors NotSupportedError Authentication plugin caching sha2 password is not supported

0 votes

Hi Guys,

I am trying to connect with MySQL, but I am facing the below error which I am not able to understand.

mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported

How can I solve this error?

Jul 15, 2020 in Python by akhtar
• 38,260 points
32,021 views
pip install mysql-connector-python its also work for me ... thank you

1 answer to this question.

0 votes

Hi@akhtar,

According to SQL documentation for python library. you need to specify the auth plugin as follows in your code as given below.

conn = mysql.connector.connect(user='root', password='password', host='127.0.0.1',port=5000,database='test',
auth_plugin='mysql_native_password')
Get a further understanding from the SQL Certification Course
answered Jul 15, 2020 by MD
• 95,460 points
Try installing:

pip mysql-connector-python

hope it works
Yeah., pip install mysql-connector-python worked!!!
yes it worked for me also
I mentioned auth_plugin but still i am getting the same error
Hi@sanket,

Did you try the above solution? If it is not working then reinstall it and try once.
Thank u so much Ramya. The solution is the best
Wonderfull, my friend. For me it was the solution.

Congrats smart guy.

Tks
where should we use it - on command prompt or powershell

Thank You dude, it worked

I installed (mysql-connector-python) by using:

pip mysql-connector-python

then i executed my code again and it worked! 

Many Thanks.

Yes!!pip install mysql-connector-python worked thank you
InterfaceError: 2003: Can't connect to MySQL server on '127.0.0.1:5000' (10061 No connection could be made because the target machine actively refused it)
0 votes
I had the same problem and passing auth_plugin='mysql_native_password' did not work, because I accidentally installed mysql-connector instead of mysql-connector-python (via pip3). Just leaving this here in case it helps someone.
answered Oct 1, 2021 by anonymous

edited Mar 5

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

Error is '<' not supported between instances of str and int

your dis is obviously not 1.13, it's ...READ MORE

answered Nov 15, 2020 in Python by Gitika
• 65,770 points
5,725 views
0 votes
1 answer

ImportError: Import by filename is not supported

Instead of doing a import like __import__ you can ...READ MORE

answered Nov 26, 2020 in Python by Gitika
• 65,770 points
3,040 views
0 votes
1 answer

Raw_input method is not working in python3. How to use it?

raw_input is not supported anymore in python3. ...READ MORE

answered May 5, 2018 in Python by aayushi
• 750 points
3,506 views
0 votes
1 answer

Error:Python3.4 can't install mysql-python

Hello @kartik, You can resolved this by the ...READ MORE

answered Jun 24, 2020 in Python by Niroj
• 82,840 points
2,331 views
0 votes
1 answer

How to create MySql database using Python?

Hi@akhtar, You need to use MySQL connector in ...READ MORE

answered Jul 15, 2020 in Python by MD
• 95,460 points
926 views
0 votes
1 answer

How to insert a date into MySQL using Python?

Hi@akhtar, You can use the DateTime module to insert a date into ...READ MORE

answered Jul 15, 2020 in Python by MD
• 95,460 points
8,416 views
0 votes
1 answer

ProgrammingError: not all arguments converted during string formatting

Sorted!!!! just found the solution, 1 - apparently ...READ MORE

answered Sep 10, 2018 in Python by Priyaj
• 58,020 points
20,565 views
0 votes
2 answers

NameError: name 'raw_input' is not defined

Hi, There may a problem with your python ...READ MORE

answered Jun 25, 2020 in Python by MD
• 95,460 points
32,998 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP