I have a very simple code to connect to the database in python.
import mysql.connector
connector = mysql.connector.connect(host="localhost", user="testuser",
password="testuser", database='testdb',port='1433')
print(connector)
cur = connector.cursor()
print(cur)
The above code is giving me below error:
mysql.connector.errors.OperationalError: 2055: Lost connection to MySQL server at 'localhost:1433', system error: 10054 An existing connection was forcibly closed by the remote host.
I didn't get proper answer in any related question. Please help me to resolve this.