IT information, news, tutorials, examples, documentation, career
Nov 5, 2017
server_uuid in MySQL 5.6+
Beginning with MySQL 5.6, the server generates a true UUID in addition to the --server-id supplied by the user. This is available as the global, read-only variable server_uuid.
When starting, the MySQL server automatically obtains a UUID as follows:
Attempt to read and use the UUID written in the file data_dir/auto.cnf (where data_dir is the server's data directory).
If data_dir/auto.cnf is not found, generate a new UUID and save it to this file, creating the file if necessary.
The auto.cnf file has a format similar to that used for my.cnf or my.ini files. In MySQL 5.6, auto.cnf has only a single [auto] section containing a single server_uuid setting and value; the file's contents appear similar to what is shown here: