its not clear what you want, but according to:
http://www.php.net/manual/en/function.mysql-get-host-info.php
the php function mysql_get_host_info() will return a string with the host name of the current MySQL server.
otherwise get the server name from your mysql_connect()/mysql_pconnect() function.