In the last episode (Nov 08), Mike Broxterman said: > I'm looking for a programatic way to obtain the real FQDN of the > myqld server, not the one used to connect to the server. Here's the > scenario, several servers running mysqld are behind a virtual IP so > when you connect to mysqld you do not know which server you are > really connected to. The get_host_info only returns the name used to > connect to the virtual address. > > I've checked the variables table but the hostname is not there > either. I can solve the problem by creating a database with the name > of the host but that's not very elegant nor can I use dots for the IP > or FQDN as the db name.
Couple ideas: . Write a UDF that returns the value of gethostname() To use: SELECT gethostname(); . Put the hostname in a single-row table. To use: SELECT hostname FROM serverinfo; . Add a read-only mysql variable, submit patches back to mysql. To use: SHOW VARIABLES like 'hostname'; -- Dan Nelson [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php