Bug #79076 make hostname a dynamic variable
Submitted: 2 Nov 2015 14:11 Modified: 16 Nov 2015 7:17
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Options Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: dynamic, hostname

[2 Nov 2015 14:11] Simon Mudd
Description:
In an attempt to make as many mysql configuration variables as possible dynamic I'm going to report those that I find I need to change but can not without restarting mysqd.

hostname is one such variable. It's not used heavily but often is used by a client to identify the server to which it is talking.  A server may not be restarted frequently and it's name may change over time.  Restarting mysqld just to change this is rather tiresome so often does not happen and it can lead to confusion later if this variable is used. e.g. SELECT @@hostname.

How to repeat:
Seen in all versions up to and including 5.7.0

myuser@myhost [(none)]> set global hostname = 'hello';
ERROR 1238 (HY000): Variable 'hostname' is a read only variable

Suggested fix:
Make the setting dynamic.
[16 Nov 2015 7:17] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

Thanks,
Umesh
[18 Jun 2016 21:28] Omer Barnir
Posted by developer:
 
Reported version value updated to reflect release name change from 5.8 to 8.0