千家信息网

MySQL 8.0.17 clone plugin 本地远程备份,并搭建主从测试过程

发表于:2025-01-20 作者:千家信息网编辑
千家信息网最后更新 2025年01月20日,本篇为测试过程,总结文章将请看下一个篇,具体过程如下:[root@es2 ~]# yum -y install mysql-community-*已加载插件:fastestmirror正在检查 mys
千家信息网最后更新 2025年01月20日MySQL 8.0.17 clone plugin 本地远程备份,并搭建主从测试过程

本篇为测试过程,总结文章将请看下一个篇,具体过程如下:

[root@es2 ~]# yum -y install mysql-community-*已加载插件:fastestmirror正在检查 mysql-community-client-8.0.17-1.el7.x86_64.rpm: mysql-community-client-8.0.17-1.el7.x86_64mysql-community-client-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-common-8.0.17-1.el7.x86_64.rpm: mysql-community-common-8.0.17-1.el7.x86_64mysql-community-common-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-devel-8.0.17-1.el7.x86_64.rpm: mysql-community-devel-8.0.17-1.el7.x86_64mysql-community-devel-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-libs-8.0.17-1.el7.x86_64.rpm: mysql-community-libs-8.0.17-1.el7.x86_64mysql-community-libs-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-libs-compat-8.0.17-1.el7.x86_64.rpm: mysql-community-libs-compat-8.0.17-1.el7.x86_64mysql-community-libs-compat-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-server-8.0.17-1.el7.x86_64.rpm: mysql-community-server-8.0.17-1.el7.x86_64mysql-community-server-8.0.17-1.el7.x86_64.rpm 将被安装正在解决依赖关系--> 正在检查事务---> 软件包 mariadb-libs.x86_64.1.5.5.60-1.el7_5 将被 取代---> 软件包 mysql-community-client.x86_64.0.8.0.17-1.el7 将被 安装---> 软件包 mysql-community-common.x86_64.0.8.0.17-1.el7 将被 安装---> 软件包 mysql-community-devel.x86_64.0.8.0.17-1.el7 将被 安装--> 正在处理依赖关系 pkgconfig(openssl),它被软件包 mysql-community-devel-8.0.17-1.el7.x86_64 需要Determining fastest mirrorsepel/x86_64/metalink                                                                                                                         | 7.2 kB  00:00:00      * base: mirrors.tuna.tsinghua.edu.cn * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.huaweicloud.combase                                                                                                                                         | 3.6 kB  00:00:00     epel                                                                                                                                         | 5.4 kB  00:00:00     extras                                                                                                                                       | 3.4 kB  00:00:00     updates                                                                                                                                      | 3.4 kB  00:00:00     epel/x86_64/primary_db         FAILED                                          http://fedora.cs.nctu.edu.tw/epel/7/x86_64/repodata/4a7d82b70bc90863a6b385eba39ccba096dabc9d26ccf8e1917539f2d02dc6b9-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found正在尝试其它镜像。To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errorsIf above article doesn't help to resolve this issue please use https://bugs.centos.org/.(1/3): epel/x86_64/group_gz                                                                                                                  |  88 kB  00:00:00     (2/3): epel/x86_64/updateinfo                                                                                                                | 998 kB  00:00:10     (3/3): epel/x86_64/primary_db                                                                                                                | 6.8 MB  00:00:21     ---> 软件包 mysql-community-libs.x86_64.0.8.0.17-1.el7 将被 舍弃---> 软件包 mysql-community-libs-compat.x86_64.0.8.0.17-1.el7 将被 舍弃---> 软件包 mysql-community-server.x86_64.0.8.0.17-1.el7 将被 安装--> 正在检查事务---> 软件包 openssl-devel.x86_64.1.1.0.2k-16.el7_6.1 将被 安装--> 正在处理依赖关系 openssl-libs(x86-64) = 1:1.0.2k-16.el7_6.1,它被软件包 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 需要--> 正在处理依赖关系 zlib-devel(x86-64),它被软件包 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 需要--> 正在处理依赖关系 krb5-devel(x86-64),它被软件包 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 需要--> 正在检查事务---> 软件包 krb5-devel.x86_64.0.1.15.1-37.el7_6 将被 安装--> 正在处理依赖关系 libkadm5(x86-64) = 1.15.1-37.el7_6,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 krb5-libs(x86-64) = 1.15.1-37.el7_6,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 libverto-devel,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 libselinux-devel,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 libcom_err-devel,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 keyutils-libs-devel,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要---> 软件包 openssl-libs.x86_64.1.1.0.2k-16.el7 将被 升级--> 正在处理依赖关系 openssl-libs(x86-64) = 1:1.0.2k-16.el7,它被软件包 1:openssl-1.0.2k-16.el7.x86_64 需要---> 软件包 openssl-libs.x86_64.1.1.0.2k-16.el7_6.1 将被 更新---> 软件包 zlib-devel.x86_64.0.1.2.7-18.el7 将被 安装--> 正在检查事务---> 软件包 keyutils-libs-devel.x86_64.0.1.5.8-3.el7 将被 安装---> 软件包 krb5-libs.x86_64.0.1.15.1-34.el7 将被 升级---> 软件包 krb5-libs.x86_64.0.1.15.1-37.el7_6 将被 更新---> 软件包 libcom_err-devel.x86_64.0.1.42.9-13.el7 将被 安装---> 软件包 libkadm5.x86_64.0.1.15.1-37.el7_6 将被 安装---> 软件包 libselinux-devel.x86_64.0.2.5-14.1.el7 将被 安装--> 正在处理依赖关系 libsepol-devel(x86-64) >= 2.5-10,它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要--> 正在处理依赖关系 pkgconfig(libsepol),它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要--> 正在处理依赖关系 pkgconfig(libpcre),它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要---> 软件包 libverto-devel.x86_64.0.0.2.5-4.el7 将被 安装---> 软件包 openssl.x86_64.1.1.0.2k-16.el7 将被 升级---> 软件包 openssl.x86_64.1.1.0.2k-16.el7_6.1 将被 更新--> 正在检查事务---> 软件包 libsepol-devel.x86_64.0.2.5-10.el7 将被 安装---> 软件包 pcre-devel.x86_64.0.8.32-17.el7 将被 安装--> 解决依赖关系完成依赖关系解决==================================================================================================================================================================== Package                                  架构                版本                              源                                                             大小====================================================================================================================================================================正在安装: mysql-community-client                   x86_64              8.0.17-1.el7                      /mysql-community-client-8.0.17-1.el7.x86_64                   146 M mysql-community-common                   x86_64              8.0.17-1.el7                      /mysql-community-common-8.0.17-1.el7.x86_64                   8.3 M mysql-community-devel                    x86_64              8.0.17-1.el7                      /mysql-community-devel-8.0.17-1.el7.x86_64                     34 M mysql-community-libs                     x86_64              8.0.17-1.el7                      /mysql-community-libs-8.0.17-1.el7.x86_64                      14 M      替换  mariadb-libs.x86_64 1:5.5.60-1.el7_5 mysql-community-libs-compat              x86_64              8.0.17-1.el7                      /mysql-community-libs-compat-8.0.17-1.el7.x86_64              9.5 M      替换  mariadb-libs.x86_64 1:5.5.60-1.el7_5 mysql-community-server                   x86_64              8.0.17-1.el7                      /mysql-community-server-8.0.17-1.el7.x86_64                   1.8 G为依赖而安装: keyutils-libs-devel                      x86_64              1.5.8-3.el7                       base                                                           37 k krb5-devel                               x86_64              1.15.1-37.el7_6                   updates                                                       271 k libcom_err-devel                         x86_64              1.42.9-13.el7                     base                                                           31 k libkadm5                                 x86_64              1.15.1-37.el7_6                   updates                                                       178 k libselinux-devel                         x86_64              2.5-14.1.el7                      base                                                          187 k libsepol-devel                           x86_64              2.5-10.el7                        base                                                           77 k libverto-devel                           x86_64              0.2.5-4.el7                       base                                                           12 k openssl-devel                            x86_64              1:1.0.2k-16.el7_6.1               updates                                                       1.5 M pcre-devel                               x86_64              8.32-17.el7                       base                                                          480 k zlib-devel                               x86_64              1.2.7-18.el7                      base                                                           50 k为依赖而更新: krb5-libs                                x86_64              1.15.1-37.el7_6                   updates                                                       803 k openssl                                  x86_64              1:1.0.2k-16.el7_6.1               updates                                                       493 k openssl-libs                             x86_64              1:1.0.2k-16.el7_6.1               updates                                                       1.2 M事务概要====================================================================================================================================================================安装  6 软件包 (+10 依赖软件包)升级           (  3 依赖软件包)总计:2.0 G总下载量:5.3 MDownloading packages:Delta RPMs disabled because /usr/bin/applydeltarpm not installed.(1/13): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm                                                                                           |  37 kB  00:00:00     (2/13): libcom_err-devel-1.42.9-13.el7.x86_64.rpm                                                                                            |  31 kB  00:00:00     (3/13): libsepol-devel-2.5-10.el7.x86_64.rpm                                                                                                 |  77 kB  00:00:00     (4/13): krb5-devel-1.15.1-37.el7_6.x86_64.rpm                                                                                                | 271 kB  00:00:02     (5/13): libselinux-devel-2.5-14.1.el7.x86_64.rpm                                                                                             | 187 kB  00:00:01     (6/13): krb5-libs-1.15.1-37.el7_6.x86_64.rpm                                                                                                 | 803 kB  00:00:04     (7/13): openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                            | 1.2 MB  00:00:03     (8/13): pcre-devel-8.32-17.el7.x86_64.rpm                                                                                                    | 480 kB  00:00:02     (9/13): zlib-devel-1.2.7-18.el7.x86_64.rpm                                                                                                   |  50 kB  00:00:00     (10/13): openssl-devel-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                          | 1.5 MB  00:00:07     (11/13): libverto-devel-0.2.5-4.el7.x86_64.rpm                                                                                               |  12 kB  00:00:27     (12/13): libkadm5-1.15.1-37.el7_6.x86_64.rpm                                                                                                 | 178 kB  00:00:30     openssl-1.0.2k-16.el7_6.1.x86_ FAILED                                          http://mirrors.163.com/centos/7.6.1810/updates/x86_64/Packages/openssl-1.0.2k-16.el7_6.1.x86_64.rpm: [Errno 12] Timeout on http://mirrors.163.com/centos/7.6.1810/updates/x86_64/Packages/openssl-1.0.2k-16.el7_6.1.x86_64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')正在尝试其它镜像。(13/13): openssl-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                                | 493 kB  00:00:10     --------------------------------------------------------------------------------------------------------------------------------------------------------------------总计                                                                                                                                123 kB/s | 5.3 MB  00:00:43     Running transaction checkRunning transaction testTransaction test succeededRunning transaction  正在更新    : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64                                                                                                        1/23   正在更新    : krb5-libs-1.15.1-37.el7_6.x86_64                                                                                                               2/23   正在安装    : mysql-community-common-8.0.17-1.el7.x86_64                                                                                                     3/23   正在安装    : mysql-community-libs-8.0.17-1.el7.x86_64                                                                                                       4/23   正在安装    : mysql-community-client-8.0.17-1.el7.x86_64                                                                                                     5/23   正在安装    : libkadm5-1.15.1-37.el7_6.x86_64                                                                                                                6/23   正在安装    : libsepol-devel-2.5-10.el7.x86_64                                                                                                               7/23   正在安装    : pcre-devel-8.32-17.el7.x86_64                                                                                                                  8/23   正在安装    : libselinux-devel-2.5-14.1.el7.x86_64                                                                                                           9/23   正在安装    : zlib-devel-1.2.7-18.el7.x86_64                                                                                                                10/23   正在安装    : libverto-devel-0.2.5-4.el7.x86_64                                                                                                             11/23   正在安装    : libcom_err-devel-1.42.9-13.el7.x86_64                                                                                                         12/23   正在安装    : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                                                        13/23   正在安装    : krb5-devel-1.15.1-37.el7_6.x86_64                                                                                                             14/23   正在安装    : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64                                                                                                      15/23   正在安装    : mysql-community-devel-8.0.17-1.el7.x86_64                                                                                                     16/23   正在安装    : mysql-community-server-8.0.17-1.el7.x86_64                                                                                                    17/23   正在安装    : mysql-community-libs-compat-8.0.17-1.el7.x86_64                                                                                               18/23   正在更新    : 1:openssl-1.0.2k-16.el7_6.1.x86_64                                                                                                            19/23   清理        : 1:openssl-1.0.2k-16.el7.x86_64                                                                                                                20/23   正在删除    : 1:mariadb-libs-5.5.60-1.el7_5.x86_64                                                                                                          21/23   清理        : krb5-libs-1.15.1-34.el7.x86_64                                                                                                                22/23   清理        : 1:openssl-libs-1.0.2k-16.el7.x86_64                                                                                                           23/23   验证中      : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                                                         1/23   验证中      : mysql-community-devel-8.0.17-1.el7.x86_64                                                                                                      2/23   验证中      : libcom_err-devel-1.42.9-13.el7.x86_64                                                                                                          3/23   验证中      : krb5-devel-1.15.1-37.el7_6.x86_64                                                                                                              4/23   验证中      : mysql-community-libs-8.0.17-1.el7.x86_64                                                                                                       5/23   验证中      : libverto-devel-0.2.5-4.el7.x86_64                                                                                                              6/23   验证中      : zlib-devel-1.2.7-18.el7.x86_64                                                                                                                 7/23   验证中      : krb5-libs-1.15.1-37.el7_6.x86_64                                                                                                               8/23   验证中      : pcre-devel-8.32-17.el7.x86_64                                                                                                                  9/23   验证中      : mysql-community-client-8.0.17-1.el7.x86_64                                                                                                    10/23   验证中      : 1:openssl-1.0.2k-16.el7_6.1.x86_64                                                                                                            11/23   验证中      : mysql-community-common-8.0.17-1.el7.x86_64                                                                                                    12/23   验证中      : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64                                                                                                       13/23   验证中      : libsepol-devel-2.5-10.el7.x86_64                                                                                                              14/23   验证中      : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64                                                                                                      15/23   验证中      : mysql-community-server-8.0.17-1.el7.x86_64                                                                                                    16/23   验证中      : libkadm5-1.15.1-37.el7_6.x86_64                                                                                                               17/23   验证中      : libselinux-devel-2.5-14.1.el7.x86_64                                                                                                          18/23   验证中      : mysql-community-libs-compat-8.0.17-1.el7.x86_64                                                                                               19/23   验证中      : 1:mariadb-libs-5.5.60-1.el7_5.x86_64                                                                                                          20/23   验证中      : 1:openssl-1.0.2k-16.el7.x86_64                                                                                                                21/23   验证中      : 1:openssl-libs-1.0.2k-16.el7.x86_64                                                                                                           22/23   验证中      : krb5-libs-1.15.1-34.el7.x86_64                                                                                                                23/23 已安装:  mysql-community-client.x86_64 0:8.0.17-1.el7        mysql-community-common.x86_64 0:8.0.17-1.el7             mysql-community-devel.x86_64 0:8.0.17-1.el7          mysql-community-libs.x86_64 0:8.0.17-1.el7          mysql-community-libs-compat.x86_64 0:8.0.17-1.el7        mysql-community-server.x86_64 0:8.0.17-1.el7       作为依赖被安装:  keyutils-libs-devel.x86_64 0:1.5.8-3.el7  krb5-devel.x86_64 0:1.15.1-37.el7_6  libcom_err-devel.x86_64 0:1.42.9-13.el7  libkadm5.x86_64 0:1.15.1-37.el7_6          libselinux-devel.x86_64 0:2.5-14.1.el7    libsepol-devel.x86_64 0:2.5-10.el7   libverto-devel.x86_64 0:0.2.5-4.el7      openssl-devel.x86_64 1:1.0.2k-16.el7_6.1   pcre-devel.x86_64 0:8.32-17.el7           zlib-devel.x86_64 0:1.2.7-18.el7    作为依赖被升级:  krb5-libs.x86_64 0:1.15.1-37.el7_6                  openssl.x86_64 1:1.0.2k-16.el7_6.1                  openssl-libs.x86_64 1:1.0.2k-16.el7_6.1                 替代:  mariadb-libs.x86_64 1:5.5.60-1.el7_5                                                                                                                              完毕![root@es2 ~]# ssh es3Last login: Wed Aug 28 16:23:24 2019 from 192.168.56.1[root@es3 ~]# yum -y localinstall mysql-community-*已加载插件:fastestmirror正在检查 mysql-community-client-8.0.17-1.el7.x86_64.rpm: mysql-community-client-8.0.17-1.el7.x86_64mysql-community-client-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-common-8.0.17-1.el7.x86_64.rpm: mysql-community-common-8.0.17-1.el7.x86_64mysql-community-common-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-devel-8.0.17-1.el7.x86_64.rpm: mysql-community-devel-8.0.17-1.el7.x86_64mysql-community-devel-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-libs-8.0.17-1.el7.x86_64.rpm: mysql-community-libs-8.0.17-1.el7.x86_64mysql-community-libs-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-libs-compat-8.0.17-1.el7.x86_64.rpm: mysql-community-libs-compat-8.0.17-1.el7.x86_64mysql-community-libs-compat-8.0.17-1.el7.x86_64.rpm 将被安装正在检查 mysql-community-server-8.0.17-1.el7.x86_64.rpm: mysql-community-server-8.0.17-1.el7.x86_64mysql-community-server-8.0.17-1.el7.x86_64.rpm 将被安装正在解决依赖关系--> 正在检查事务---> 软件包 mariadb-libs.x86_64.1.5.5.60-1.el7_5 将被 取代---> 软件包 mysql-community-client.x86_64.0.8.0.17-1.el7 将被 安装---> 软件包 mysql-community-common.x86_64.0.8.0.17-1.el7 将被 安装---> 软件包 mysql-community-devel.x86_64.0.8.0.17-1.el7 将被 安装--> 正在处理依赖关系 pkgconfig(openssl),它被软件包 mysql-community-devel-8.0.17-1.el7.x86_64 需要Determining fastest mirrorsepel/x86_64/metalink                                                                                                                         | 7.2 kB  00:00:00      * base: mirrors.aliyun.com * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.aliyun.com * updates: mirror.jdcloud.combase                                                                                                                                         | 3.6 kB  00:00:00     epel                                                                                                                                         | 5.4 kB  00:00:00     extras                                                                                                                                       | 3.4 kB  00:00:00     updates                                                                                                                                      | 3.4 kB  00:00:00     epel/x86_64/updateinfo         FAILED                                                                                             ]  0.0 B/s |    0 B  --:--:-- ETA http://fedora.cs.nctu.edu.tw/epel/7/x86_64/repodata/73e5709a1cb420a1cbf22ead472e9b0dd44afe50a0e313647e4c584427a5e841-updateinfo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found正在尝试其它镜像。To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errorsIf above article doesn't help to resolve this issue please use https://bugs.centos.org/.(1/3): epel/x86_64/group_gz                                                                                                                  |  88 kB  00:00:01     (2/3): epel/x86_64/updateinfo                                                                                                                | 998 kB  00:00:15     (3/3): epel/x86_64/primary_db                                                                                                                | 6.8 MB  00:00:21     ---> 软件包 mysql-community-libs.x86_64.0.8.0.17-1.el7 将被 舍弃---> 软件包 mysql-community-libs-compat.x86_64.0.8.0.17-1.el7 将被 舍弃---> 软件包 mysql-community-server.x86_64.0.8.0.17-1.el7 将被 安装--> 正在检查事务---> 软件包 openssl-devel.x86_64.1.1.0.2k-16.el7_6.1 将被 安装--> 正在处理依赖关系 openssl-libs(x86-64) = 1:1.0.2k-16.el7_6.1,它被软件包 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 需要--> 正在处理依赖关系 zlib-devel(x86-64),它被软件包 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 需要--> 正在处理依赖关系 krb5-devel(x86-64),它被软件包 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64 需要--> 正在检查事务---> 软件包 krb5-devel.x86_64.0.1.15.1-37.el7_6 将被 安装--> 正在处理依赖关系 libkadm5(x86-64) = 1.15.1-37.el7_6,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 krb5-libs(x86-64) = 1.15.1-37.el7_6,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 libverto-devel,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 libselinux-devel,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 libcom_err-devel,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要--> 正在处理依赖关系 keyutils-libs-devel,它被软件包 krb5-devel-1.15.1-37.el7_6.x86_64 需要---> 软件包 openssl-libs.x86_64.1.1.0.2k-16.el7 将被 升级--> 正在处理依赖关系 openssl-libs(x86-64) = 1:1.0.2k-16.el7,它被软件包 1:openssl-1.0.2k-16.el7.x86_64 需要---> 软件包 openssl-libs.x86_64.1.1.0.2k-16.el7_6.1 将被 更新---> 软件包 zlib-devel.x86_64.0.1.2.7-18.el7 将被 安装--> 正在检查事务---> 软件包 keyutils-libs-devel.x86_64.0.1.5.8-3.el7 将被 安装---> 软件包 krb5-libs.x86_64.0.1.15.1-34.el7 将被 升级---> 软件包 krb5-libs.x86_64.0.1.15.1-37.el7_6 将被 更新---> 软件包 libcom_err-devel.x86_64.0.1.42.9-13.el7 将被 安装---> 软件包 libkadm5.x86_64.0.1.15.1-37.el7_6 将被 安装---> 软件包 libselinux-devel.x86_64.0.2.5-14.1.el7 将被 安装--> 正在处理依赖关系 libsepol-devel(x86-64) >= 2.5-10,它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要--> 正在处理依赖关系 pkgconfig(libsepol),它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要--> 正在处理依赖关系 pkgconfig(libpcre),它被软件包 libselinux-devel-2.5-14.1.el7.x86_64 需要---> 软件包 libverto-devel.x86_64.0.0.2.5-4.el7 将被 安装---> 软件包 openssl.x86_64.1.1.0.2k-16.el7 将被 升级---> 软件包 openssl.x86_64.1.1.0.2k-16.el7_6.1 将被 更新--> 正在检查事务---> 软件包 libsepol-devel.x86_64.0.2.5-10.el7 将被 安装---> 软件包 pcre-devel.x86_64.0.8.32-17.el7 将被 安装--> 解决依赖关系完成依赖关系解决==================================================================================================================================================================== Package                                  架构                版本                              源                                                             大小====================================================================================================================================================================正在安装: mysql-community-client                   x86_64              8.0.17-1.el7                      /mysql-community-client-8.0.17-1.el7.x86_64                   146 M mysql-community-common                   x86_64              8.0.17-1.el7                      /mysql-community-common-8.0.17-1.el7.x86_64                   8.3 M mysql-community-devel                    x86_64              8.0.17-1.el7                      /mysql-community-devel-8.0.17-1.el7.x86_64                     34 M mysql-community-libs                     x86_64              8.0.17-1.el7                      /mysql-community-libs-8.0.17-1.el7.x86_64                      14 M      替换  mariadb-libs.x86_64 1:5.5.60-1.el7_5 mysql-community-libs-compat              x86_64              8.0.17-1.el7                      /mysql-community-libs-compat-8.0.17-1.el7.x86_64              9.5 M      替换  mariadb-libs.x86_64 1:5.5.60-1.el7_5 mysql-community-server                   x86_64              8.0.17-1.el7                      /mysql-community-server-8.0.17-1.el7.x86_64                   1.8 G为依赖而安装: keyutils-libs-devel                      x86_64              1.5.8-3.el7                       base                                                           37 k krb5-devel                               x86_64              1.15.1-37.el7_6                   updates                                                       271 k libcom_err-devel                         x86_64              1.42.9-13.el7                     base                                                           31 k libkadm5                                 x86_64              1.15.1-37.el7_6                   updates                                                       178 k libselinux-devel                         x86_64              2.5-14.1.el7                      base                                                          187 k libsepol-devel                           x86_64              2.5-10.el7                        base                                                           77 k libverto-devel                           x86_64              0.2.5-4.el7                       base                                                           12 k openssl-devel                            x86_64              1:1.0.2k-16.el7_6.1               updates                                                       1.5 M pcre-devel                               x86_64              8.32-17.el7                       base                                                          480 k zlib-devel                               x86_64              1.2.7-18.el7                      base                                                           50 k为依赖而更新: krb5-libs                                x86_64              1.15.1-37.el7_6                   updates                                                       803 k openssl                                  x86_64              1:1.0.2k-16.el7_6.1               updates                                                       493 k openssl-libs                             x86_64              1:1.0.2k-16.el7_6.1               updates                                                       1.2 M事务概要====================================================================================================================================================================安装  6 软件包 (+10 依赖软件包)升级           (  3 依赖软件包)总计:2.0 G总下载量:5.3 MDownloading packages:Delta RPMs disabled because /usr/bin/applydeltarpm not installed.(1/13): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm                                                                                           |  37 kB  00:00:00     (2/13): libcom_err-devel-1.42.9-13.el7.x86_64.rpm                                                                                            |  31 kB  00:00:00     (3/13): libsepol-devel-2.5-10.el7.x86_64.rpm                                                                                                 |  77 kB  00:00:00     (4/13): libverto-devel-0.2.5-4.el7.x86_64.rpm                                                                                                |  12 kB  00:00:00     (5/13): libkadm5-1.15.1-37.el7_6.x86_64.rpm                                                                                                  | 178 kB  00:00:02     (6/13): krb5-devel-1.15.1-37.el7_6.x86_64.rpm                                                                                                | 271 kB  00:00:02     (7/13): libselinux-devel-2.5-14.1.el7.x86_64.rpm                                                                                             | 187 kB  00:00:02     (8/13): openssl-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                                 | 493 kB  00:00:04     (9/13): zlib-devel-1.2.7-18.el7.x86_64.rpm                                                                                                   |  50 kB  00:00:00     (10/13): pcre-devel-8.32-17.el7.x86_64.rpm                                                                                                   | 480 kB  00:00:05     (11/13): openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                           | 1.2 MB  00:00:08     (12/13): openssl-devel-1.0.2k-16.el7_6.1.x86_64.rpm                                                                                          | 1.5 MB  00:00:09     (13/13): krb5-libs-1.15.1-37.el7_6.x86_64.rpm                                                                                                | 803 kB  00:00:13     --------------------------------------------------------------------------------------------------------------------------------------------------------------------总计                                                                                                                                407 kB/s | 5.3 MB  00:00:13     Running transaction checkRunning transaction testTransaction test succeededRunning transaction  正在更新    : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64                                                                                                        1/23   正在更新    : krb5-libs-1.15.1-37.el7_6.x86_64                                                                                                               2/23   正在安装    : mysql-community-common-8.0.17-1.el7.x86_64                                                                                                     3/23   正在安装    : mysql-community-libs-8.0.17-1.el7.x86_64                                                                                                       4/23   正在安装    : mysql-community-client-8.0.17-1.el7.x86_64                                                                                                     5/23   正在安装    : libkadm5-1.15.1-37.el7_6.x86_64                                                                                                                6/23   正在安装    : libsepol-devel-2.5-10.el7.x86_64                                                                                                               7/23   正在安装    : pcre-devel-8.32-17.el7.x86_64                                                                                                                  8/23   正在安装    : libselinux-devel-2.5-14.1.el7.x86_64                                                                                                           9/23   正在安装    : zlib-devel-1.2.7-18.el7.x86_64                                                                                                                10/23   正在安装    : libverto-devel-0.2.5-4.el7.x86_64                                                                                                             11/23   正在安装    : libcom_err-devel-1.42.9-13.el7.x86_64                                                                                                         12/23   正在安装    : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                                                        13/23   正在安装    : krb5-devel-1.15.1-37.el7_6.x86_64                                                                                                             14/23   正在安装    : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64                                                                                                      15/23   正在安装    : mysql-community-devel-8.0.17-1.el7.x86_64                                                                                                     16/23   正在安装    : mysql-community-server-8.0.17-1.el7.x86_64                                                                                                    17/23   正在安装    : mysql-community-libs-compat-8.0.17-1.el7.x86_64                                                                                               18/23   正在更新    : 1:openssl-1.0.2k-16.el7_6.1.x86_64                                                                                                            19/23   清理        : 1:openssl-1.0.2k-16.el7.x86_64                                                                                                                20/23   正在删除    : 1:mariadb-libs-5.5.60-1.el7_5.x86_64                                                                                                          21/23   清理        : krb5-libs-1.15.1-34.el7.x86_64                                                                                                                22/23   清理        : 1:openssl-libs-1.0.2k-16.el7.x86_64                                                                                                           23/23   验证中      : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                                                                         1/23   验证中      : mysql-community-devel-8.0.17-1.el7.x86_64                                                                                                      2/23   验证中      : libcom_err-devel-1.42.9-13.el7.x86_64                                                                                                          3/23   验证中      : krb5-devel-1.15.1-37.el7_6.x86_64                                                                                                              4/23   验证中      : mysql-community-libs-8.0.17-1.el7.x86_64                                                                                                       5/23   验证中      : libverto-devel-0.2.5-4.el7.x86_64                                                                                                              6/23   验证中      : zlib-devel-1.2.7-18.el7.x86_64                                                                                                                 7/23   验证中      : krb5-libs-1.15.1-37.el7_6.x86_64                                                                                                               8/23   验证中      : pcre-devel-8.32-17.el7.x86_64                                                                                                                  9/23   验证中      : mysql-community-client-8.0.17-1.el7.x86_64                                                                                                    10/23   验证中      : 1:openssl-1.0.2k-16.el7_6.1.x86_64                                                                                                            11/23   验证中      : mysql-community-common-8.0.17-1.el7.x86_64                                                                                                    12/23   验证中      : 1:openssl-libs-1.0.2k-16.el7_6.1.x86_64                                                                                                       13/23   验证中      : libsepol-devel-2.5-10.el7.x86_64                                                                                                              14/23   验证中      : 1:openssl-devel-1.0.2k-16.el7_6.1.x86_64                                                                                                      15/23   验证中      : mysql-community-server-8.0.17-1.el7.x86_64                                                                                                    16/23   验证中      : libkadm5-1.15.1-37.el7_6.x86_64                                                                                                               17/23   验证中      : libselinux-devel-2.5-14.1.el7.x86_64                                                                                                          18/23   验证中      : mysql-community-libs-compat-8.0.17-1.el7.x86_64                                                                                               19/23   验证中      : 1:mariadb-libs-5.5.60-1.el7_5.x86_64                                                                                                          20/23   验证中      : 1:openssl-1.0.2k-16.el7.x86_64                                                                                                                21/23   验证中      : 1:openssl-libs-1.0.2k-16.el7.x86_64                                                                                                           22/23   验证中      : krb5-libs-1.15.1-34.el7.x86_64                                                                                                                23/23 已安装:  mysql-community-client.x86_64 0:8.0.17-1.el7        mysql-community-common.x86_64 0:8.0.17-1.el7             mysql-community-devel.x86_64 0:8.0.17-1.el7          mysql-community-libs.x86_64 0:8.0.17-1.el7          mysql-community-libs-compat.x86_64 0:8.0.17-1.el7        mysql-community-server.x86_64 0:8.0.17-1.el7       作为依赖被安装:  keyutils-libs-devel.x86_64 0:1.5.8-3.el7  krb5-devel.x86_64 0:1.15.1-37.el7_6  libcom_err-devel.x86_64 0:1.42.9-13.el7  libkadm5.x86_64 0:1.15.1-37.el7_6          libselinux-devel.x86_64 0:2.5-14.1.el7    libsepol-devel.x86_64 0:2.5-10.el7   libverto-devel.x86_64 0:0.2.5-4.el7      openssl-devel.x86_64 1:1.0.2k-16.el7_6.1   pcre-devel.x86_64 0:8.32-17.el7           zlib-devel.x86_64 0:1.2.7-18.el7    作为依赖被升级:  krb5-libs.x86_64 0:1.15.1-37.el7_6                  openssl.x86_64 1:1.0.2k-16.el7_6.1                  openssl-libs.x86_64 1:1.0.2k-16.el7_6.1                 替代:  mariadb-libs.x86_64 1:5.5.60-1.el7_5                                                                                                                              完毕![root@es3 ~]# exit登出Connection to es3 closed.[root@es2 ~]# vim /etc/my.cnf# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[mysqld]## Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M## Remove the leading "# " to disable binary logging# Binary logging captures changes between backups and is enabled by# default. It's default setting is log_bin=binlog# disable_log_bin## Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M## Remove leading # to revert to previous value for default_authentication_plugin,# this will increase compatibility with older clients. For background, see:# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin# default-authentication-plugin=mysql_native_passworddatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid"/etc/my.cnf" 35L, 1312C 已写入                                                                                                                   [root@es2 ~]# systemctl start mysqld[root@es2 ~]# netstat -nltpActive Internet connections (only servers)Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3293/sshd           tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      3535/master         tcp6       0      0 :::3306                 :::*                    LISTEN      4057/mysqld         tcp6       0      0 :::22                   :::*                    LISTEN      3293/sshd           tcp6       0      0 ::1:25                  :::*                    LISTEN      3535/master         tcp6       0      0 :::33060                :::*                    LISTEN      4057/mysqld         [root@es2 ~]# cat /etc/my.cnf |grep -iv on[mysqld]## Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M## Remove the leading "# " to disable binary logging# Binary logging captures changes between backups and is enabled by# default. It's default setting is log_bin=binlog# disable_log_bin## Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M## this will increase compatibility with older clients. For background, see:datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid[root@es2 ~]# cat /etc/my.cnf |grep -i on # For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html# Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Remove leading # to revert to previous value for default_authentication_plugin,# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin# default-authentication-plugin=mysql_native_passwordgtid-mode = ONenforce-gtid-consistency = ONlog-slave-updates = ON[root@es2 ~]# cat /etc/my.cnf |grep  ONgtid-mode = ONenforce-gtid-consistency = ONlog-slave-updates = ON[root@es2 ~]# cat /var/log/mysqld.log |grep password2019-08-28T08:50:17.669803Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: iwSeuFagt0&3[root@es2 ~]# mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)[root@es2 ~]# mysql -p'iwSeuFagt0&3'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 9Server version: 8.0.17Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> alter user user() identified by 'iwSeuFagt0&31';Query OK, 0 rows affected (0.33 sec)mysql> exitBye[root@es2 ~]# ssh es3Last login: Wed Aug 28 16:42:33 2019 from es2[root@es3 ~]# vim /etc/my.cnf# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[mysqld]## Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M## Remove the leading "# " to disable binary logging# Binary logging captures changes between backups and is enabled by# default. It's default setting is log_bin=binlog# disable_log_bin## Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M## Remove leading # to revert to previous value for default_authentication_plugin,# this will increase compatibility with older clients. For background, see:# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin# default-authentication-plugin=mysql_native_passworddatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid"/etc/my.cnf" 35L, 1312C 已写入                                                                                                                   [root@es3 ~]# systemctl  start mysqld[root@es3 ~]# cat /var/log/mysqld.log |grep password2019-08-28T08:54:27.953612Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: kfzvo3Won:5r[root@es3 ~]# mysql -p'kfzvo3Won:5r'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 8Server version: 8.0.17Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> alter user user() identified by 'iwSeuFagt0&31';Query OK, 0 rows affected (0.06 sec)mysql> exitBye[root@es3 ~]# exit登出Connection to es3 closed.[root@es2 ~]# mysql -p'iwSeuFagt0&31'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 10Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> INSTALL PLUGIN clone SONAME 'mysql_clone.so';Query OK, 0 rows affected (0.12 sec)mysql> CREATE USER clone_user@'%' identified by 'iwSeuFagt0&31';Query OK, 0 rows affected (0.07 sec)mysql> GRANT BACKUP_ADMIN ON *.* TO 'clone_user';Query OK, 0 rows affected (0.04 sec)mysql> CREATE USER repl_user@'%' identified by 'iwSeuFagt0&31'         -> ;Query OK, 0 rows affected (0.02 sec)mysql>  grant replication slave on *.* to repl_user;Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.04 sec)mysql> exitBye[root@es2 ~]# mysql -uclone_user -p'iwSeuFagt0&31'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 11Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> shwo variables like 'se%';ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'shwo variables like 'se%'' at line 1mysql> show variables like 'se%';  +---------------------------------+------------------------------------------------------------------------------------------+| Variable_name                   | Value                                                                                    |+---------------------------------+------------------------------------------------------------------------------------------+| secondary_engine_cost_threshold | 100000.000000                                                                            || secure_file_priv                | /var/lib/mysql-files/                                                                    || server_id                       | 1                                                                                        || server_id_bits                  | 32                                                                                       || server_uuid                     | dbda28c9-c970-11e9-b268-0800275c8ec3                                                     || session_track_gtids             | OFF                                                                                      || session_track_schema            | ON                                                                                       || session_track_state_change      | OFF                                                                                      || session_track_system_variables  | time_zone,autocommit,character_set_client,character_set_results,character_set_connection || session_track_transaction_info  | OFF                                                                                      |+---------------------------------+------------------------------------------------------------------------------------------+10 rows in set (0.01 sec)mysql> show variables like 'secure_file_priv';+------------------+-----------------------+| Variable_name    | Value                 |+------------------+-----------------------+| secure_file_priv | /var/lib/mysql-files/ |+------------------+-----------------------+1 row in set (0.00 sec)mysql>  CLONE LOCAL DATA DIRECTORY = '/var/lib/mysql-files/clone_dir1';Query OK, 0 rows affected (19.50 sec)mysql> create database after_clone1;ERROR 1044 (42000): Access denied for user 'clone_user'@'%' to database 'after_clone1'mysql> exitBye[root@es2 ~]# mysql -p'iwSeuFagt0&31'             mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 12Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema || mysql              || performance_schema || sys                |+--------------------+4 rows in set (0.06 sec)mysql> create database after_clone1;Query OK, 1 row affected (0.29 sec)mysql> exitBye[root@es2 ~]# mysql -uclone_user -p'iwSeuFagt0&31'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 13Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>  CLONE LOCAL DATA DIRECTORY = '/var/lib/mysql-files/clone_dir2';Query OK, 0 rows affected (16.99 sec)mysql> exitBye[root@es2 ~]# mysql -p'iwSeuFagt0&31'             mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 14Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database           |+--------------------+| after_clone1       || information_schema || mysql              || performance_schema || sys                |+--------------------+5 rows in set (0.00 sec)mysql> create database after_clone2;Query OK, 1 row affected (0.04 sec)mysql> exitBye[root@es2 ~]# mysql -p'iwSeuFagt0&31'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 15Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database           |+--------------------+| after_clone1       || after_clone2       || information_schema || mysql              || performance_schema || sys                |+--------------------+6 rows in set (0.00 sec)mysql> exitBye[root@es2 ~]# systemctl stop mysqld[root@es2 ~]# vim /etc/my.cnf# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[mysqld]## Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M## Remove the leading "# " to disable binary logging# Binary logging captures changes between backups and is enabled by# default. It's default setting is log_bin=binlog# disable_log_bin## Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M## Remove leading # to revert to previous value for default_authentication_plugin,# this will increase compatibility with older clients. For background, see:# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin# default-authentication-plugin=mysql_native_passworddatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidgtid-mode = ONenforce-gtid-consistency = ONlog-slave-updates = ON"/etc/my.cnf" 36L, 1353C 已写入[root@es2 ~]# cat /etc/my.cnf |grep -v ^#[mysqld]datadir=/var/lib/mysql-files/clone_dir1socket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidgtid-mode = ONenforce-gtid-consistency = ONlog-slave-updates = ON[root@es2 ~]# systemctl start mysqld[root@es2 ~]# mysql -p'iwSeuFagt0&31'    mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 8Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema || mysql              || performance_schema || sys                |+--------------------+4 rows in set (0.00 sec)mysql> show variables like 'datadir';+---------------+----------------------------------+| Variable_name | Value                            |+---------------+----------------------------------+| datadir       | /var/lib/mysql-files/clone_dir1/ |+---------------+----------------------------------+1 row in set (0.01 sec)mysql> SELECT BINLOG_FILE, BINLOG_POSITION FROM performance_schema.clone_status;+---------------+-----------------+| BINLOG_FILE   | BINLOG_POSITION |+---------------+-----------------+| binlog.000001 |            1741 |+---------------+-----------------+1 row in set (0.00 sec)mysql> SELECT @@GLOBAL.GTID_EXECUTED;+------------------------------------------+| @@GLOBAL.GTID_EXECUTED                   |+------------------------------------------+| dbda28c9-c970-11e9-b268-0800275c8ec3:1-6 |+------------------------------------------+1 row in set (0.00 sec)mysql> exitBye[root@es2 ~]# systemctl stop mysqld      [root@es2 ~]# vim /etc/my.cnf            # For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[mysqld]## Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M## Remove the leading "# " to disable binary logging# Binary logging captures changes between backups and is enabled by# default. It's default setting is log_bin=binlog# disable_log_bin## Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M## Remove leading # to revert to previous value for default_authentication_plugin,# this will increase compatibility with older clients. For background, see:# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin# default-authentication-plugin=mysql_native_password#datadir=/var/lib/mysqldatadir=/var/lib/mysql-files/clone_dir1socket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidgtid-mode = ONenforce-gtid-consistency = ONlog-slave-updates = ON"/etc/my.cnf" 36L, 1353C 已写入                                                                                                                   [root@es2 ~]# systemctl start mysqld [root@es2 ~]# mysql -p'iwSeuFagt0&31'mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 8Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show variables like 'datadir';+---------------+----------------------------------+| Variable_name | Value                            |+---------------+----------------------------------+| datadir       | /var/lib/mysql-files/clone_dir2/ |+---------------+----------------------------------+1 row in set (0.01 sec)mysql> SELECT BINLOG_FILE, BINLOG_POSITION FROM performance_schema.clone_status;+---------------+-----------------+| BINLOG_FILE   | BINLOG_POSITION |+---------------+-----------------+| binlog.000001 |            1950 |+---------------+-----------------+1 row in set (0.00 sec)mysql> SELECT @@GLOBAL.GTID_EXECUTED;+------------------------------------------+| @@GLOBAL.GTID_EXECUTED                   |+------------------------------------------+| dbda28c9-c970-11e9-b268-0800275c8ec3:1-7 |+------------------------------------------+1 row in set (0.00 sec)mysql> exitBye[root@es2 ~]# vim /etc/my.cnf        # For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[mysqld]## Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M## Remove the leading "# " to disable binary logging# Binary logging captures changes between backups and is enabled by# default. It's default setting is log_bin=binlog# disable_log_bin## Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M## Remove leading # to revert to previous value for default_authentication_plugin,# this will increase compatibility with older clients. For background, see:# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin# default-authentication-plugin=mysql_native_password#datadir=/var/lib/mysqldatadir=/var/lib/mysql-files/clone_dir2socket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidgtid-mode = ONenforce-gtid-consistency = ONlog-slave-updates = ON"/etc/my.cnf" 36L, 1353C 已写入                                                                                                                   [root@es2 ~]# systemctl start mysqld [root@es2 ~]# systemctl restart mysqld[root@es2 ~]# mysql -p'iwSeuFagt0&31' mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 8Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show variables like 'datadir';+---------------+-----------------+| Variable_name | Value           |+---------------+-----------------+| datadir       | /var/lib/mysql/ |+---------------+-----------------+1 row in set (0.01 sec)mysql> SELECT BINLOG_FILE, BINLOG_POSITION FROM performance_schema.clone_status;Empty set (0.00 sec)mysql> SELECT @@GLOBAL.GTID_EXECUTED;+------------------------------------------+| @@GLOBAL.GTID_EXECUTED                   |+------------------------------------------+| dbda28c9-c970-11e9-b268-0800275c8ec3:1-8 |+------------------------------------------+1 row in set (0.00 sec)mysql> exitBye[root@es2 ~]# ssh es3Last login: Wed Aug 28 16:53:44 2019 from es2[root@es3 ~]# mysql -p'iwSeuFagt0&31';mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 9Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> INSTALL PLUGIN clone SONAME 'mysql_clone.so';Query OK, 0 rows affected (0.09 sec)mysql> CREATE USER clone_user@'%' identified by 'iwSeuFagt0&31';Query OK, 0 rows affected (0.32 sec)mysql> GRANT CLONE_ADMIN on *.* to  clone_user;Query OK, 0 rows affected (0.01 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)mysql> exitBye[root@es3 ~]# mysql -uclone_user -p'iwSeuFagt0&31';mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 10Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> clone instance from clone_user@'192.168.56.15':3306    -> identified by 'iwSeuFagt0&31';ERROR 3869 (HY000): Clone system configuration: 192.168.56.15:3306 is not found in clone_valid_donor_list: mysql> set clone_valid_donor_list ='192.168.56.15:3306';ERROR 1229 (HY000): Variable 'clone_valid_donor_list' is a GLOBAL variable and should be set with SET GLOBALmysql> set global clone_valid_donor_list ='192.168.56.15:3306';ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operationmysql> exitBye[root@es3 ~]# mysql -p'iwSeuFagt0&31';             mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 11Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> set global clone_valid_donor_list ='192.168.56.15:3306';Query OK, 0 rows affected (0.00 sec)mysql> exitBye[root@es3 ~]# mysql -uclone_user -p'iwSeuFagt0&31';mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 12Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> clone instance from clone_user@'192.168.56.15':3306         ->  identified by 'iwSeuFagt0&31';Query OK, 0 rows affected (5.19 sec)mysql> show databases;ERROR 2006 (HY000): MySQL server has gone awayNo connection. Trying to reconnect...ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)ERROR: Can't connect to the servermysql> show databases;No connection. Trying to reconnect...Connection id:    8Current database: *** NONE ***+--------------------+| Database           |+--------------------+| information_schema |+--------------------+1 row in set (0.01 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema |+--------------------+1 row in set (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema |+--------------------+1 row in set (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema |+--------------------+1 row in set (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema |+--------------------+1 row in set (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema |+--------------------+1 row in set (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema |+--------------------+1 row in set (0.00 sec)mysql> exitBye[root@es3 ~]# mysql -p'iwSeuFagt0&31';             mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 9Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database           |+--------------------+| after_clone1       || after_clone2       || information_schema || mysql              || performance_schema || sys                |+--------------------+6 rows in set (0.00 sec)mysql> SELECT BINLOG_FILE, BINLOG_POSITION FROM performance_schema.clone_status;+---------------+-----------------+| BINLOG_FILE   | BINLOG_POSITION |+---------------+-----------------+| binlog.000002 |             195 |+---------------+-----------------+1 row in set (0.01 sec)mysql> SELECT @@GLOBAL.GTID_EXECUTED;+------------------------------------------+| @@GLOBAL.GTID_EXECUTED                   |+------------------------------------------+| dbda28c9-c970-11e9-b268-0800275c8ec3:1-8 |+------------------------------------------+1 row in set (0.00 sec)mysql> CHANGE MASTER TO MASTER_HOST = '192.168.56.15', MASTER_PORT = 3306,MASTER_AUTO_POSITION = 1;Query OK, 0 rows affected (0.13 sec)mysql> START SLAVE USER = 'repl_user' PASSWORD =  'iwSeuFagt0&31' ;Query OK, 0 rows affected, 1 warning (0.01 sec)mysql> show slave status\G*************************** 1. row ***************************               Slave_IO_State: Connecting to master                  Master_Host: 192.168.56.15                  Master_User: repl_user                  Master_Port: 3306                Connect_Retry: 60              Master_Log_File:           Read_Master_Log_Pos: 4               Relay_Log_File: es3-relay-bin.000001                Relay_Log_Pos: 4        Relay_Master_Log_File:              Slave_IO_Running: Connecting            Slave_SQL_Running: Yes              Replicate_Do_DB:           Replicate_Ignore_DB:            Replicate_Do_Table:        Replicate_Ignore_Table:       Replicate_Wild_Do_Table:   Replicate_Wild_Ignore_Table:                    Last_Errno: 0                   Last_Error:                  Skip_Counter: 0          Exec_Master_Log_Pos: 0              Relay_Log_Space: 155              Until_Condition: None               Until_Log_File:                 Until_Log_Pos: 0           Master_SSL_Allowed: No           Master_SSL_CA_File:            Master_SSL_CA_Path:               Master_SSL_Cert:             Master_SSL_Cipher:                Master_SSL_Key:         Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No                Last_IO_Errno: 2061                Last_IO_Error: error connecting to master 'repl_user@192.168.56.15:3306' - retry-time: 60 retries: 1 message: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.               Last_SQL_Errno: 0               Last_SQL_Error:   Replicate_Ignore_Server_Ids:              Master_Server_Id: 0                  Master_UUID:              Master_Info_File: mysql.slave_master_info                    SQL_Delay: 0          SQL_Remaining_Delay: NULL      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates           Master_Retry_Count: 86400                  Master_Bind:       Last_IO_Error_Timestamp: 190828 17:23:26     Last_SQL_Error_Timestamp:                Master_SSL_Crl:            Master_SSL_Crlpath:            Retrieved_Gtid_Set:             Executed_Gtid_Set: dbda28c9-c970-11e9-b268-0800275c8ec3:1-8                Auto_Position: 1         Replicate_Rewrite_DB:                  Channel_Name:            Master_TLS_Version:        Master_public_key_path:         Get_master_public_key: 0            Network_Namespace: 1 row in set (0.00 sec)mysql> exitBye[root@es3 ~]# exit登出Connection to es3 closed.[root@es2 ~]# mysql -p'iwSeuFagt0&31'   mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 12Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> alter USER repl_user@'%' identified  WITH mysql_native_password by 'iwSeuFagt0&31' ;Query OK, 0 rows affected (0.28 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)mysql> exitBye[root@es2 ~]# ssh es3Last login: Wed Aug 28 17:11:22 2019 from es2[root@es3 ~]# mysql -p'iwSeuFagt0&31';mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 12Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show slave status\G*************************** 1. row ***************************               Slave_IO_State: Connecting to master                  Master_Host: 192.168.56.15                  Master_User: repl_user                  Master_Port: 3306                Connect_Retry: 60              Master_Log_File:           Read_Master_Log_Pos: 4               Relay_Log_File: es3-relay-bin.000001                Relay_Log_Pos: 4        Relay_Master_Log_File:              Slave_IO_Running: Connecting            Slave_SQL_Running: Yes              Replicate_Do_DB:           Replicate_Ignore_DB:            Replicate_Do_Table:        Replicate_Ignore_Table:       Replicate_Wild_Do_Table:   Replicate_Wild_Ignore_Table:                    Last_Errno: 0                   Last_Error:                  Skip_Counter: 0          Exec_Master_Log_Pos: 0              Relay_Log_Space: 155              Until_Condition: None               Until_Log_File:                 Until_Log_Pos: 0           Master_SSL_Allowed: No           Master_SSL_CA_File:            Master_SSL_CA_Path:               Master_SSL_Cert:             Master_SSL_Cipher:                Master_SSL_Key:         Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No                Last_IO_Errno: 2061                Last_IO_Error: error connecting to master 'repl_user@192.168.56.15:3306' - retry-time: 60 retries: 3 message: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.               Last_SQL_Errno: 0               Last_SQL_Error:   Replicate_Ignore_Server_Ids:              Master_Server_Id: 0                  Master_UUID:              Master_Info_File: mysql.slave_master_info                    SQL_Delay: 0          SQL_Remaining_Delay: NULL      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates           Master_Retry_Count: 86400                  Master_Bind:       Last_IO_Error_Timestamp: 190828 17:25:26     Last_SQL_Error_Timestamp:                Master_SSL_Crl:            Master_SSL_Crlpath:            Retrieved_Gtid_Set:             Executed_Gtid_Set: dbda28c9-c970-11e9-b268-0800275c8ec3:1-8                Auto_Position: 1         Replicate_Rewrite_DB:                  Channel_Name:            Master_TLS_Version:        Master_public_key_path:         Get_master_public_key: 0            Network_Namespace: 1 row in set (0.00 sec)mysql> show slave status\G*************************** 1. row ***************************               Slave_IO_State: Connecting to master                  Master_Host: 192.168.56.15                  Master_User: repl_user                  Master_Port: 3306                Connect_Retry: 60              Master_Log_File:           Read_Master_Log_Pos: 4               Relay_Log_File: es3-relay-bin.000001                Relay_Log_Pos: 4        Relay_Master_Log_File:              Slave_IO_Running: Connecting            Slave_SQL_Running: Yes              Replicate_Do_DB:           Replicate_Ignore_DB:            Replicate_Do_Table:        Replicate_Ignore_Table:       Replicate_Wild_Do_Table:   Replicate_Wild_Ignore_Table:                    Last_Errno: 0                   Last_Error:                  Skip_Counter: 0          Exec_Master_Log_Pos: 0              Relay_Log_Space: 155              Until_Condition: None               Until_Log_File:                 Until_Log_Pos: 0           Master_SSL_Allowed: No           Master_SSL_CA_File:            Master_SSL_CA_Path:               Master_SSL_Cert:             Master_SSL_Cipher:                Master_SSL_Key:         Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No                Last_IO_Errno: 2061                Last_IO_Error: error connecting to master 'repl_user@192.168.56.15:3306' - retry-time: 60 retries: 3 message: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.               Last_SQL_Errno: 0               Last_SQL_Error:   Replicate_Ignore_Server_Ids:              Master_Server_Id: 0                  Master_UUID:              Master_Info_File: mysql.slave_master_info                    SQL_Delay: 0          SQL_Remaining_Delay: NULL      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates           Master_Retry_Count: 86400                  Master_Bind:       Last_IO_Error_Timestamp: 190828 17:25:26     Last_SQL_Error_Timestamp:                Master_SSL_Crl:            Master_SSL_Crlpath:            Retrieved_Gtid_Set:             Executed_Gtid_Set: dbda28c9-c970-11e9-b268-0800275c8ec3:1-8                Auto_Position: 1         Replicate_Rewrite_DB:                  Channel_Name:            Master_TLS_Version:        Master_public_key_path:         Get_master_public_key: 0            Network_Namespace: 1 row in set (0.00 sec)mysql> stop salve ;ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'salve' at line 1mysql> stop slave ;Query OK, 0 rows affected (0.28 sec)mysql> start slave;Query OK, 0 rows affected (0.03 sec)mysql> show slave status\G*************************** 1. row ***************************               Slave_IO_State:                   Master_Host: 192.168.56.15                  Master_User:                   Master_Port: 3306                Connect_Retry: 60              Master_Log_File:           Read_Master_Log_Pos: 4               Relay_Log_File: es3-relay-bin.000001                Relay_Log_Pos: 4        Relay_Master_Log_File:              Slave_IO_Running: No            Slave_SQL_Running: Yes              Replicate_Do_DB:           Replicate_Ignore_DB:            Replicate_Do_Table:        Replicate_Ignore_Table:       Replicate_Wild_Do_Table:   Replicate_Wild_Ignore_Table:                    Last_Errno: 0                   Last_Error:                  Skip_Counter: 0          Exec_Master_Log_Pos: 0              Relay_Log_Space: 155              Until_Condition: None               Until_Log_File:                 Until_Log_Pos: 0           Master_SSL_Allowed: No           Master_SSL_CA_File:            Master_SSL_CA_Path:               Master_SSL_Cert:             Master_SSL_Cipher:                Master_SSL_Key:         Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No                Last_IO_Errno: 13117                Last_IO_Error: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated.               Last_SQL_Errno: 0               Last_SQL_Error:   Replicate_Ignore_Server_Ids:              Master_Server_Id: 0                  Master_UUID:              Master_Info_File: mysql.slave_master_info                    SQL_Delay: 0          SQL_Remaining_Delay: NULL      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates           Master_Retry_Count: 86400                  Master_Bind:       Last_IO_Error_Timestamp: 190828 17:26:07     Last_SQL_Error_Timestamp:                Master_SSL_Crl:            Master_SSL_Crlpath:            Retrieved_Gtid_Set:             Executed_Gtid_Set: dbda28c9-c970-11e9-b268-0800275c8ec3:1-8                Auto_Position: 1         Replicate_Rewrite_DB:                  Channel_Name:            Master_TLS_Version:        Master_public_key_path:         Get_master_public_key: 0            Network_Namespace: 1 row in set (0.00 sec)mysql> stop slave;Query OK, 0 rows affected (0.05 sec)mysql> START SLAVE USER = 'repl_user' PASSWORD =  'iwSeuFagt0&31' ;Query OK, 0 rows affected, 1 warning (0.01 sec)mysql> show slave status\G*************************** 1. row ***************************               Slave_IO_State:                   Master_Host: 192.168.56.15                  Master_User:                   Master_Port: 3306                Connect_Retry: 60              Master_Log_File:           Read_Master_Log_Pos: 4               Relay_Log_File: es3-relay-bin.000001                Relay_Log_Pos: 4        Relay_Master_Log_File:              Slave_IO_Running: No            Slave_SQL_Running: Yes              Replicate_Do_DB:           Replicate_Ignore_DB:            Replicate_Do_Table:        Replicate_Ignore_Table:       Replicate_Wild_Do_Table:   Replicate_Wild_Ignore_Table:                    Last_Errno: 0                   Last_Error:                  Skip_Counter: 0          Exec_Master_Log_Pos: 0              Relay_Log_Space: 155              Until_Condition: None               Until_Log_File:                 Until_Log_Pos: 0           Master_SSL_Allowed: No           Master_SSL_CA_File:            Master_SSL_CA_Path:               Master_SSL_Cert:             Master_SSL_Cipher:                Master_SSL_Key:         Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No                Last_IO_Errno: 13117                Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).               Last_SQL_Errno: 0               Last_SQL_Error:   Replicate_Ignore_Server_Ids:              Master_Server_Id: 1                  Master_UUID:              Master_Info_File: mysql.slave_master_info                    SQL_Delay: 0          SQL_Remaining_Delay: NULL      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates           Master_Retry_Count: 86400                  Master_Bind:       Last_IO_Error_Timestamp: 190828 17:26:44     Last_SQL_Error_Timestamp:                Master_SSL_Crl:            Master_SSL_Crlpath:            Retrieved_Gtid_Set:             Executed_Gtid_Set: dbda28c9-c970-11e9-b268-0800275c8ec3:1-8                Auto_Position: 1         Replicate_Rewrite_DB:                  Channel_Name:            Master_TLS_Version:        Master_public_key_path:         Get_master_public_key: 0            Network_Namespace: 1 row in set (0.00 sec)mysql> exitBye[root@es3 ~]# exit登出Connection to es3 closed.[root@es2 ~]# vim /etc/my.cnf# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[mysqld]## Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M## Remove the leading "# " to disable binary logging# Binary logging captures changes between backups and is enabled by# default. It's default setting is log_bin=binlog# disable_log_bin## Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M## Remove leading # to revert to previous value for default_authentication_plugin,# this will increase compatibility with older clients. For background, see:# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin# default-authentication-plugin=mysql_native_passworddatadir=/var/lib/mysql#datadir=/var/lib/mysql-files/clone_dir2socket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidgtid-mode = ONenforce-gtid-consistency = ONlog-slave-updates = ON"/etc/my.cnf" 38L, 1366C 已写入                                                                                                                   [root@es2 ~]# systemctl restart mysqld[root@es2 ~]# ssh es3                 Last login: Wed Aug 28 17:25:38 2019 from es2[root@es3 ~]# vim /etc/my.cnf# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[mysqld]## Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M## Remove the leading "# " to disable binary logging# Binary logging captures changes between backups and is enabled by# default. It's default setting is log_bin=binlog# disable_log_bin## Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M## Remove leading # to revert to previous value for default_authentication_plugin,# this will increase compatibility with older clients. For background, see:# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin# default-authentication-plugin=mysql_native_passworddatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.socklog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidgtid-mode = ONenforce-gtid-consistency = ONlog-slave-updates = ON"/etc/my.cnf" 37L, 1325C 已写入                                                                                                                   [root@es3 ~]# systemctl restart mysqld[root@es3 ~]# mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)[root@es3 ~]# mysql -p'iwSeuFagt0&31';mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 11Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show slave status\G*************************** 1. row ***************************               Slave_IO_State: Connecting to master                  Master_Host: 192.168.56.15                  Master_User: test                  Master_Port: 3306                Connect_Retry: 60              Master_Log_File:           Read_Master_Log_Pos: 4               Relay_Log_File: es3-relay-bin.000002                Relay_Log_Pos: 4        Relay_Master_Log_File:              Slave_IO_Running: Connecting            Slave_SQL_Running: Yes              Replicate_Do_DB:           Replicate_Ignore_DB:            Replicate_Do_Table:        Replicate_Ignore_Table:       Replicate_Wild_Do_Table:   Replicate_Wild_Ignore_Table:                    Last_Errno: 0                   Last_Error:                  Skip_Counter: 0          Exec_Master_Log_Pos: 124              Relay_Log_Space: 155              Until_Condition: None               Until_Log_File:                 Until_Log_Pos: 0           Master_SSL_Allowed: No           Master_SSL_CA_File:            Master_SSL_CA_Path:               Master_SSL_Cert:             Master_SSL_Cipher:                Master_SSL_Key:         Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No                Last_IO_Errno: 1045                Last_IO_Error: error connecting to master 'test@192.168.56.15:3306' - retry-time: 60 retries: 1 message: Access denied for user 'test'@'es3' (using password: NO)               Last_SQL_Errno: 0               Last_SQL_Error:   Replicate_Ignore_Server_Ids:              Master_Server_Id: 0                  Master_UUID:              Master_Info_File: mysql.slave_master_info                    SQL_Delay: 0          SQL_Remaining_Delay: NULL      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates           Master_Retry_Count: 86400                  Master_Bind:       Last_IO_Error_Timestamp: 190828 17:28:11     Last_SQL_Error_Timestamp:                Master_SSL_Crl:            Master_SSL_Crlpath:            Retrieved_Gtid_Set:             Executed_Gtid_Set: dbda28c9-c970-11e9-b268-0800275c8ec3:1-8                Auto_Position: 1         Replicate_Rewrite_DB:                  Channel_Name:            Master_TLS_Version:        Master_public_key_path:         Get_master_public_key: 0            Network_Namespace: 1 row in set (0.00 sec)mysql> stop slave;Query OK, 0 rows affected (0.28 sec)mysql> START SLAVE USER = 'repl_user' PASSWORD =  'iwSeuFagt0&31' ;Query OK, 0 rows affected, 1 warning (0.05 sec)mysql> show slave status\G*************************** 1. row ***************************               Slave_IO_State: Waiting for master to send event                  Master_Host: 192.168.56.15                  Master_User: repl_user                  Master_Port: 3306                Connect_Retry: 60              Master_Log_File: binlog.000003          Read_Master_Log_Pos: 195               Relay_Log_File: es3-relay-bin.000004                Relay_Log_Pos: 403        Relay_Master_Log_File: binlog.000003             Slave_IO_Running: Yes            Slave_SQL_Running: Yes              Replicate_Do_DB:           Replicate_Ignore_DB:            Replicate_Do_Table:        Replicate_Ignore_Table:       Replicate_Wild_Do_Table:   Replicate_Wild_Ignore_Table:                    Last_Errno: 0                   Last_Error:                  Skip_Counter: 0          Exec_Master_Log_Pos: 195              Relay_Log_Space: 1271              Until_Condition: None               Until_Log_File:                 Until_Log_Pos: 0           Master_SSL_Allowed: No           Master_SSL_CA_File:            Master_SSL_CA_Path:               Master_SSL_Cert:             Master_SSL_Cipher:                Master_SSL_Key:         Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No                Last_IO_Errno: 0                Last_IO_Error:                Last_SQL_Errno: 0               Last_SQL_Error:   Replicate_Ignore_Server_Ids:              Master_Server_Id: 1                  Master_UUID: dbda28c9-c970-11e9-b268-0800275c8ec3             Master_Info_File: mysql.slave_master_info                    SQL_Delay: 0          SQL_Remaining_Delay: NULL      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates           Master_Retry_Count: 86400                  Master_Bind:       Last_IO_Error_Timestamp:      Last_SQL_Error_Timestamp:                Master_SSL_Crl:            Master_SSL_Crlpath:            Retrieved_Gtid_Set: dbda28c9-c970-11e9-b268-0800275c8ec3:9-10            Executed_Gtid_Set: dbda28c9-c970-11e9-b268-0800275c8ec3:1-10                Auto_Position: 1         Replicate_Rewrite_DB:                  Channel_Name:            Master_TLS_Version:        Master_public_key_path:         Get_master_public_key: 0            Network_Namespace: 1 row in set (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| after_clone1       || after_clone2       || information_schema || mysql              || performance_schema || sys                |+--------------------+6 rows in set (0.00 sec)mysql> exitBye[root@es3 ~]# exit登出Connection to es3 closed.[root@es2 ~]# mysql -p'iwSeuFagt0&31' mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 10Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database           |+--------------------+| after_clone1       || after_clone2       || information_schema || mysql              || performance_schema || sys                |+--------------------+6 rows in set (0.00 sec)mysql> use after_clone2Database changedmysql> create table t_clone(id int not null auto_increment primary  key ,name varchar(255));Query OK, 0 rows affected (0.36 sec)mysql> insert into t_clone(name) values('c'),('l'),('o'),('n'),('e');Query OK, 5 rows affected (0.29 sec)Records: 5  Duplicates: 0  Warnings: 0mysql> select * from after_clone2.t_clone;+----+------+| id | name |+----+------+|  1 | c    ||  2 | l    ||  3 | o    ||  4 | n    ||  5 | e    |+----+------+5 rows in set (0.00 sec)mysql> drop database after_clone1;Query OK, 0 rows affected (0.31 sec)mysql> exitBye[root@es2 ~]# ssh es3                 Last login: Wed Aug 28 17:27:47 2019 from es2[root@es3 ~]# mysql -p'iwSeuFagt0&31';mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 14Server version: 8.0.17 MySQL Community Server - GPLCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database           |+--------------------+| after_clone2       || information_schema || mysql              || performance_schema || sys                |+--------------------+5 rows in set (0.00 sec)mysql> select * from after_clone2.t_clone;+----+------+| id | name |+----+------+|  1 | c    ||  2 | l    ||  3 | o    ||  4 | n    ||  5 | e    |+----+------+5 rows in set (0.00 sec)mysql> exitBye


0