Does MySQLdb automatically reconnect if the connection to the database is
broken?
It seems so.
I'm asking this since I have a longrunning Python precess that is
connected to Mysql-4.1.11, and I execute set names utf8 when I connect
to it.
But after running a day the results from the
Does MySQLdb automatically reconnect if the connection to the database is
broken?
I'm asking this since I have a longrunning Python precess that is connected
to Mysql-4.1.11, and I execute set names utf8 when I connect to it.
But after running a day the results from the python program were
I don't beleive that it does. You can however call ping() on the
connection which should attempt an automatic reconnection.
See the docs for mysql_ping:
http://dev.mysql.com/doc/mysql/en/mysql-ping.html
I've never tested that, but I have a need for it also so let me know if
it works or not.