Thanks for the fast reply.
I like the idea of piping in the servername to a small table on startup.
Since this will only change on startup, sounds like an excellent idea.
Or I may upgrade to above 5.0.41...
Baron Schwartz wrote:
> Ben Clewett wrote:
>> Dear MySQL,
>> I'm running 5.0.26 through Heartbeat. Which seems to work well, even
>> as a replication slave and Heartbeat continously stopping and starting
>> the server.
>> The Heartbeat moves MySQL around from server to server when a failure
>> occures. I am trying to find a way for MySQL to report the server
>> host name on which it's currently sitting. Without any luck.
>> Would any kind members know of a way of getting this information from
> I only know of two ways, though there may be more.
> 1) The hostname system variable, which was added in 5.0.41
> 2) Perhaps a UDF that makes a system call.
> There might be some external ways to do it also. For example, create a
> table with a single row, and have a startup script replace the value in
> it with the server's hostname upon startup. Then you can query this value.