mysql_get_server_name — Returns the name of the connected database server

const char * mysql_get_server_name(MYSQL * mysql);

Returns the name of the connected database server.

Parameters

mysql

A mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().

Return value

Returns the name of the connected database server.

[Note]

In case the connection is using a plugin to connect to a database the name of the plugin will be returned.

See also

mysql_options(), mysql_real_connect()