S
S
sound9012018-11-30 09:56:13
JavaScript
sound901, 2018-11-30 09:56:13

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

2 answer(s)
S
Sergey, 2015-12-18
Protko @Fesor

already tried a million things

map

B
Boris Syomov, 2018-11-30
@kotomyava

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 question

Ask a Question

731 491 924 answers to any question