L
L
l3372015-07-08 06:29:15
MySQL
l337, 2015-07-08 06:29:15

Mysql on Ubuntu (VMware) + MySQLdb (python), intermittent?

I installed Ubuntu mysql on a virtual machine, forwarded port 3306, started a user for remote connection. I'm trying to connect to the database from the host Windows using the Mysqldb - Python module. The connection goes through, I can make requests, etc. But if I disconnect from the database (cursor.close(), db.close() or without it), then when I reconnect, the module can (and most often does) give an error:
"Lost connection to MySQL server at 'waiting for initial communication packet', system error: 0"
At the same time, if you try to connect via telnet / ncat, nothing happens either (it just hangs until it
falls off on its own) I look into the database - the connections are empty (only the console through which I can look), in aborted connections are zero too.
If you wait a certain time (always different!) Then everything works ... It infuriates a little and slows down development ... What tell me??
PS Firewalls are disabled on both Ubuntu and Windows

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question