PHP mysql_get_server_info() Function

Definition and Usage

The mysql_get_server_info() function returns information about the MySQL server.

If successful, returns the version number of the MySQL server, if failed, returns false.

Syntax

mysql_get_server_info(connection)
Parameter Description
connection Optional. Specifies the MySQL connection. If not specified, the previous connection is used.

Example

<?php
$con = mysql_connect("localhost", "hello", "321");
echo "MySQL server info: " . mysql_get_server_info($con);
?>

Output:

MySQL server info: 5.0.18-nt