Name

ping( )

Synopsis

$database_handle->ping( )

Use this to determine if a MySQL server is still running and the database connection is still available. There are no arguments for this method.

...
$results = $dbh->ping( );
print "Results:  $results";
...

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.