1、利用uuid函数生成新的uuid
mysql> select uuid();
+--------------------------------------+
| uuid() |
+--------------------------------------+
| 159d0c6b-2d39-11ed-ad53-000c29c9f5d4 |
+--------------------------------------+
1 row in set (0.00 sec)
2、查看配置文件目录
mysql> show variables like 'datadir';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| datadir | /var/lib/mysql/ |
+---------------+-----------------+
1 row in set (0.03 sec)
3、编辑配置文件目录
vi /var/lib/mysql/auto.cnf
4、uuid修改新生成的uuid
server-uuid=159d0c6b-2d39-11ed-ad53-000c29c9f5d4
5、重启服务
systemctl restart mysqld