Unable to connect mysql from Pycharm


import mysql.connector, datetime
cnx = mysql.connector.connect(user=“xxx”, password=“ixxxx”,

C:\Users\Ravinder\PycharmProjects\jdbcDemo\venv\t\Scripts\python.exe C:/Users/Ravinder/PycharmProjects/jdbcDemo/src/main/python/mysqldemo.py
Traceback (most recent call last):
File “C:\Users\Ravinder\PycharmProjects\jdbcDemo\venv\t\lib\site-packages\mysql\connector\network.py”, line 509, in open_connection
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

I am getting above error and I have replaced xxx with proper access which i tried in labs



It’s not possible to connect from an IDE to itversity cluster. try with IP address & port number.
I Know it will not work, but you can give a try & let us know here. So others will learn from it.