1、查看uuid
mysql> show variables like "%uuid%";
+---------------+--------------------------------------+
| Variable_name | Value |
+---------------+--------------------------------------+
| server_uuid | ef2531e3-6402-11ed-abf9-000c29325a3f |
+---------------+--------------------------------------+
1 row in set (0.00 sec)
mysql>
2、利用UUID函数生成UUID
UUID函数生成的是随机的UUID几乎不可能相等。
mysql> select uuid();
+--------------------------------------+
| uuid() |
+--------------------------------------+
| ae8468ea-6414-11ed-8392-000c29325a3f |
+--------------------------------------+
1 row in set (0.00 sec)
mysql>
3、修改配置文件
root@ub-62-binary:~# find / -iname auto.cnf
/data/mysql/auto.cnf
root@ub-62-b