mysql_get_server_info

Get MySQL server info

&mysql.alternative.note;

- `mysqli_get_server_info`
- `PDO::getAttribute` with `attribute` as `PDO::ATTR_SERVER_VERSION`

&reftitle.description; ``string``false```mysql_get_server_info` `resource` `link_identifier` NULL

Retrieves the MySQL server version.

&reftitle.parameters;

&mysql.linkid.description;
&reftitle.returnvalues;

Returns the MySQL server version on success&return.falseforfailure;.

&reftitle.examples;

### `mysql_get_server_info` example

    <?php
    $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
    if (!$link) {
        die('Could not connect: ' . mysql_error());
    }
    printf("MySQL server version: %s\n", mysql_get_server_info());
    ?>

&example.outputs.similar;

    MySQL server version: 4.0.1-alpha

&reftitle.seealso;

- `mysql_get_client_info`
- `mysql_get_host_info`
- `mysql_get_proto_info`
- `phpversion`