I have 2 unrelated questions: 1) Is there any way to get the hostname that the server is running on from within mysql? All I can come up with is (pseudo coded):
mysql> system echo insert mysql.hostname `hostname` ... > hostname.sql mysql> source hostname.sql Does mysql make it available as a variable somewhere? I have scoured the docs to find nothing obvious. Note that I am not interested in where I am connected from (select user();). 2) Is there a way to exit an sql script at the top of the script if it turns out that it is running on a slave in a replication scenario? ... something like: if slave then exit; (followed by more sql) A 'show slave status' dumps something like a table, but I don't see how to save any of the info in a variable that I might later use in a case statement. Basically, if the results of show slave status aren't zip, I should exit because I am the/a slave. Thanks for any clues! Brian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]