Answer the question
In order to leave comments, you need to log in
How to solve connection error using mysql.connector?
mysql.connector.erros.OperationalError: 2055: lost connection to MySQL Server at 'localhist:1433', system error: 10054
cnx=mysql.connector.connect(user="SA", passwd="pass", host="localhost", port="1433", database="test")
cur = cnx.cursor()
cur.execute("show table")
for X in cur:
Print x
Answer the question
In order to leave comments, you need to log in
If you are connecting through some kind of slow tunnel, you may need to increase the connect_timeout in the mysql server settings.
This error is almost certainly not related to mysql.connector. It is worth trying to do the same in the mysql console client and make sure that the error is the same.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question