Python Forum
Mysql-Python Connectivity Error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mysql-Python Connectivity Error
#1
Installed the mysql-connector through pip. Got the following error while establishing the connection. All the connection details are proper.
This is the code.
import mysql.connector as sql
mycon=sql.connect(host='localhost',user='root',passwd='123',database='db',charset='utf8')
if mycon.is_connected()==True:
    print("tr")
This is the error message that i got
Error:
Traceback (most recent call last): File "C:\Users\ursch\OneDrive\Desktop\aa.py", line 2, in <module> mycon=sql.connect(host='localhost',user='root',passwd='123',database='db',charset='utf8') File "C:\Users\ursch\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mysql\connector\__init__.py", line 179, in connect return MySQLConnection(*args, **kwargs) File "C:\Users\ursch\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mysql\connector\connection.py", line 95, in __init__ self.connect(**kwargs) File "C:\Users\ursch\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mysql\connector\abstracts.py", line 716, in connect self._open_connection() File "C:\Users\ursch\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mysql\connector\connection.py", line 210, in _open_connection self._ssl) File "C:\Users\ursch\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mysql\connector\connection.py", line 142, in _do_auth auth_plugin=self._auth_plugin) File "C:\Users\ursch\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mysql\connector\protocol.py", line 102, in make_auth auth_data, ssl_enabled) File "C:\Users\ursch\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mysql\connector\protocol.py", line 58, in _auth_response auth = get_auth_plugin(auth_plugin)( File "C:\Users\ursch\AppData\Local\Programs\Python\Python37-32\lib\site-packages\mysql\connector\authentication.py", line 191, in get_auth_plugin "Authentication plugin '{0}' is not supported".format(plugin_name)) mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported >>>
Reply
#2
Check this link https://python-forum.io/Thread-Python-3-...2_password
Reply
#3
Thank you! Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Jira Connectivity Shyam 0 171 Mar-19-2024, 05:43 PM
Last Post: Shyam
  Mysql and mysql.connector error lostintime 2 612 Oct-03-2023, 10:25 PM
Last Post: lostintime
  Mysql Syntax error in pymysql ilknurg 4 2,291 May-18-2022, 06:50 AM
Last Post: ibreeden
  Mysql error message: Lost connection to MySQL server during query tomtom 6 15,685 Feb-09-2022, 09:55 AM
Last Post: ibreeden
Question Debian 11 Bullseye | Python 3.9.x | pip install mysql-connector-python-rf problems BrandonKastning 4 6,574 Feb-05-2022, 08:25 PM
Last Post: BrandonKastning
  mySQL Database error not resolving. cybertooth 2 3,119 Aug-30-2021, 05:45 PM
Last Post: ibreeden
  MYSQL.CONNECTOR ERROR DB1 8 3,777 Jul-23-2021, 03:31 AM
Last Post: DB1
  pool mysql error - not catch by try\except? korenron 1 2,101 Jul-05-2021, 11:26 AM
Last Post: ibreeden
  Python and MySql ogautier 8 3,250 May-20-2021, 11:10 PM
Last Post: Pedroski55
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 error from Mysql call AkaAndrew123 1 3,386 Apr-28-2021, 08:16 AM
Last Post: AkaAndrew123

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020