PDF (US Ltr)
- 5.1Mb
PDF (A4)
- 5.1Mb
HTML Download (TGZ)
- 2.7Mb
HTML Download (Zip)
- 2.7Mb
Syntax:
cnx.ping(reconnect=False, attempts=1, delay=0)
Check whether the connection to the MySQL server is still available.
When reconnect
is set to
True
, one or more attempts
are made to try to reconnect to the MySQL server, and these
options are forwarded to the
reconnect()>method.
Use the delay
argument (seconds) if you want
to wait between each retry.
When the connection is not available, an
InterfaceError
is raised. Use the
is_connected()
method to check the connection without raising an error.
Raises InterfaceError
on errors.