Python Forum

Full Version: Mysql-Python Connectivity Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 >>>
Thank you! Smile