mysql8.0.17里 引入了一个clone插件, 可以方便我们快速克隆出一个从库或者MGR的节点:
8.0.17 releasenote地址:https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-17.html
MySQL现在提供了一个克隆插件,允许在本地克隆InnoDB数据(不常用)或从远程MySQL服务器实例克隆。本地克隆操作将克隆的数据存储在运行MySQL实例的同一服务器或节点上。远程克隆操作通过网络将克隆数据从施主MySQL服务器实例传输到启动克隆操作的接收方服务器或节点。
克隆插件支持复制。除克隆数据外,克隆操作还从捐赠者中提取并传输复制坐标,并将其应用于收件人,从而可以使用克隆插件来配置组复制成员和复制从属。使用克隆插件进行配置比复制大量事务要快得多,效率也要高。组复制成员还可以配置为使用克隆插件作为备用的恢复方法,以便成员自动选择从种子成员检索组数据的最有效方法。
CLONE插件相关官方文档:
https://dev.mysql.com/doc/refman/8.0/en/clone-plugin.html
https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-remote.html
https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-replication.html 使用clone插件给老集群添加从库 或者 给MGR集群添加新的节点
https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-monitoring.html 监控克隆的运行情况
https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-limitations.html 克隆插件的限制
实验(简单起见,我这里的实验环境全部使用dbdeployer快速搭建):
已有主从集群(主节点 192.168.2.4:20718)
新启动的节点:192.168.2.4:8017
具体操作如下:
已有主从节点 (主:192.168.2.4:20718)在执行:
INSTALL PLUGIN CLONE SONAME "mysql_clone.so"; -- 安装clone插件
-- 添加相关账号和授权
CREATE USER clone_user@'%' IDENTIFIED BY "clone_pass";
GRANT BACKUP_ADMIN ON *.* to clone_user;
GRANT SELECT ON performance_schema.* TO clone_user;
GRANT EXECUTE ON *.* to clone_user;
-- 创建一个复制用的账号
create user rpl@'%' IDENTIFIED WITH mysql_native_password BY 'rpl';
grant replication client,replication slave on *.* to rpl@'%' ;
新的节点192.168.2.4:8017上执行:
INSTALL PLUGIN CLONE SONAME "mysql_clone.so"; -- 安装clone插件
-- 添加相关账号和授权
CREATE USER clone_user@'%' IDENTIFIED BY "clone_pass";
GRANT CLONE_ADMIN ON *.* to clone_user;
GRANT SELECT ON performance_schema.* TO clone_user;
GRANT EXECUTE ON *.* to clone_user;
-- 设置提供数据的节点(种子节点)
SET GLOBAL clone_valid_donor_list = "192.168.2.4:20718";
SHOW VARIABLES LIKE 'clone_valid_donor_list';
-- 开始从远程MySQL(捐赠者)克隆数据并将其传输到当前的MySQL实例
CLONE INSTANCE FROM clone_user@192.168.2.4:20718 IDENTIFIED BY "clone_pass";
## PS: 如果不需要SSL,可使用 CLONE INSTANCE FROM clone_user@192.168.2.4:20718 IDENTIFIED BY "clone_password" REQUIRE NO SSL;
完成克隆后,新的节点的mysqld进程会自动重启,不要紧张。。
然后,我们到新节点看下当前的gtid和binlog情况:
mysql [localhost:8017] {root} ((none)) > show master status ;
+------------------+----------+--------------+------------------+--------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+--------------------------------------------+
| mysql-bin.000002 | 155 | | | 00020718-1111-1111-1111-111111111111:1-891 |
+------------------+----------+--------------+------------------+--------------------------------------------+
mysql [localhost:8017] {root} ((none)) > show global variables like '%gtid%';
+----------------------------------+--------------------------------------------+
| Variable_name | Value |
+----------------------------------+--------------------------------------------+
| binlog_gtid_simple_recovery | ON |
| enforce_gtid_consistency | ON |
| gtid_executed | 00020718-1111-1111-1111-111111111111:1-891 |
| gtid_executed_compression_period | 1000 |
| gtid_mode | ON |
| gtid_owned | |
| gtid_purged | 00020718-1111-1111-1111-111111111111:1-891 |
| session_track_gtids | OFF |
+----------------------------------+--------------------------------------------+
到这里后,其实我们就可以把这个节点 加到主从集群中充当一个从库了,执行命令:
CHANGE MASTER TO
MASTER_HOST='192.168.2.4',
MASTER_USER='rpl',
MASTER_PASSWORD='rpl',
MASTER_PORT=20718,
MASTER_AUTO_POSITION=1;
start slave;
show slave status \G
同样的,如果我们之前是从MGR的节点去CLONE数据,完成操作后,我们就可以将新的节点加入到MGR集群中,操作方式与上面的差不多。
其它补充阅读(翻译自官网文档):
克隆数据时,将创建以下目录和文件供内部使用。它们不应该被修改。
#clone:包含克隆操作使用的内部克隆文件。在克隆数据的目录中创建。
#ib_archive:包含内部存档的日志文件,在克隆操作期间存档在供体上。
*.#clone files:在远程克隆操作替换现有数据目录时在收件人上创建的临时数据文件。
监控克隆进度的几个命令(在新的节点上执行):
mysql [localhost:8017] {root} ((none)) > select * from performance_schema.clone_status \G
*************************** 1. row ***************************
ID: 1
PID: 0
STATE: Completed
BEGIN_TIME: 2019-07-24 20:38:43.310
END_TIME: 2019-07-24 20:38:54.884
SOURCE: 192.168.2.4:20718
DESTINATION: LOCAL INSTANCE --- 这里是从本地CLONE的(因为实际上我是在本机用sandbox跑的实验环境,mysqld都是在一台机器上)
ERROR_NO: 0
ERROR_MESSAGE:
BINLOG_FILE: mysql-bin.000001
BINLOG_POSITION: 400942896
GTID_EXECUTED: 00020718-1111-1111-1111-111111111111:1-885
1 row in set (0.00 sec)
clone_status表,提供当前或上次执行的克隆操作的状态。克隆操作有四种可能的状态: Not Started,In Progress,Completed,和 Failed。
mysql [localhost:8017] {root} ((none)) > select * from performance_schema.clone_progress ;
+------+-----------+-----------+----------------------------+----------------------------+---------+-----------+-----------+-----------+------------+---------------+
| ID | STAGE | STATE | BEGIN_TIME | END_TIME | THREADS | ESTIMATE | DATA | NETWORK | DATA_SPEED | NETWORK_SPEED |
+------+-----------+-----------+----------------------------+----------------------------+---------+-----------+-----------+-----------+------------+---------------+
| 1 | DROP DATA | Completed | 2019-07-24 20:38:43.320322 | 2019-07-24 20:38:45.081750 | 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | FILE COPY | Completed | 2019-07-24 20:38:45.081998 | 2019-07-24 20:38:45.852416 | 1 | 364090580 | 364090580 | 364118751 | 0 | 0 |
| 1 | PAGE COPY | Completed | 2019-07-24 20:38:45.852691 | 2019-07-24 20:38:45.985628 | 1 | 0 | 0 | 99 | 0 | 0 |
| 1 | REDO COPY | Completed | 2019-07-24 20:38:45.985888 | 2019-07-24 20:38:46.086326 | 1 | 13824 | 13824 | 14221 | 0 | 0 |
| 1 | FILE SYNC | Completed | 2019-07-24 20:38:46.086571 | 2019-07-24 20:38:49.647790 | 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | RESTART | Completed | 2019-07-24 20:38:49.647790 | 2019-07-24 20:38:53.593816 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | RECOVERY | Completed | 2019-07-24 20:38:53.593816 | 2019-07-24 20:38:54.883633 | 0 | 0 | 0 | 0 | 0 | 0 |
+------+-----------+-----------+----------------------------+----------------------------+---------+-----------+-----------+-----------+------------+---------------+
7 rows in set (0.00 sec)
clone_progress表,按阶段提供当前或上次执行的克隆操作的进度信息。克隆操作的各个阶段包括DROP DATA, FILE COPY, PAGE_COPY, REDO_COPY, FILE_SYNC,RESTART,和RECOVERY。
使用PS库阶段事件 监视克隆操作:
克隆操作可能需要一些时间才能完成,具体取决于数据量和与数据传输相关的其他因素。有三个阶段事件用于监视克隆操作的进度。每个阶段事件报告 WORK_COMPLETED和 WORK_ESTIMATED值。随着操作的进行,报告的值会被修改。
这种监控克隆操作的方法可以在捐赠者或接收者MySQL服务器实例上使用。
按发生顺序,克隆操作阶段事件包括:
tage/innodb/clone (file copy):表示克隆操作的文件复制阶段的进度。 WORK_ESTIMATED和 WORK_COMPLETED单位是文件块。在文件复制阶段开始时已知要传输的文件数,并且基于文件数估计块的数量。 WORK_ESTIMATED设置为估计文件块的数量。WORK_COMPLETED 在每个块发送后更新。
stage/innodb/clone (page copy):表示克隆操作的页面复制阶段的进度。WORK_ESTIMATED和 WORK_COMPLETED单位是页面。文件复制阶段完成后,将传输要传输的页数,并将 WORK_ESTIMATED其设置为此值。 WORK_COMPLETED在每个页面发送后更新。
stage/innodb/clone (redo copy):表示克隆操作的重做复制阶段的进度。WORK_ESTIMATED和 WORK_COMPLETED单位是重做块。页面复制阶段完成后,要传输的重做块的数量是已知的,并 WORK_ESTIMATED设置为该值。 WORK_COMPLETED在每个块发送后更新。
使用PS库克隆检测监控克隆操作:
SELECT * FROM performance_schema.setup_instruments WHERE NAME LIKE '%clone%';
+----------------------------------------------+---------+-------+------------+------------+---------------+
| NAME | ENABLED | TIMED | PROPERTIES | VOLATILITY | DOCUMENTATION |
+----------------------------------------------+---------+-------+------------+------------+---------------+
| wait/synch/mutex/innodb/clone_snapshot_mutex | NO | NO | | 0 | NULL |
| wait/synch/mutex/innodb/clone_sys_mutex | NO | NO | | 0 | NULL |
| wait/synch/mutex/innodb/clone_task_mutex | NO | NO | | 0 | NULL |
| wait/io/file/innodb/innodb_clone_file | YES | YES | | 0 | NULL |
| stage/innodb/clone (file copy) | YES | YES | progress | 0 | NULL |
| stage/innodb/clone (redo copy) | YES | YES | progress | 0 | NULL |
| stage/innodb/clone (page copy) | YES | YES | progress | 0 | NULL |
| statement/abstract/clone | YES | YES | mutable | 0 | NULL |
| statement/clone/local | YES | YES | | 0 | NULL |
| statement/clone/client | YES | YES | | 0 | NULL |
| statement/clone/server | YES | YES | | 0 | NULL |
| memory/innodb/clone | YES | NULL | | 0 | NULL |
| memory/clone/data | YES | NULL | | 0 | NULL |
+----------------------------------------------+---------+-------+------------+------------+---------------+
13 rows in set (0.01 sec)
相关系统变量(https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-options-variables.html):
mysql [localhost:8017] {root} ((none)) > show global variables like '%clone%';
+-----------------------------+---------+
| Variable_name | Value |
+-----------------------------+---------+
| clone_autotune_concurrency | ON |
| clone_buffer_size | 4194304 |
| clone_ddl_timeout | 300 | ## 重要参数
| clone_enable_compression | OFF | ## 在远程克隆操作期间启用网络层的数据压缩。压缩以CPU为代价节省网络带宽。启用压缩可以提高数据传输速率。CPU负载较低的话,可以设置为ON
| clone_max_concurrency | 16 | ## 克隆的并发数量,保持默认即可
| clone_max_data_bandwidth | 0 | ## 设置单线程的最大传输速度,0表示不限制
| clone_max_network_bandwidth | 0 |
| clone_ssl_ca | |
| clone_ssl_cert | |
| clone_ssl_key | |
| clone_valid_donor_list | | ## 重要参数
+-----------------------------+---------+
11 rows in set (0.00 sec)
clone_ddl_timeout
执行克隆操作时等待备份锁定的时间(以秒为单位)。克隆操作无法与DDL操作同时运行。捐赠者和接收者MySQL服务器实例上需要备份锁。克隆操作等待当前的DDL操作完成。获取备份锁后,DDL操作必须等待克隆操作完成。值为0表示不进行克隆操作的备份锁定。在这种情况下,如果同时尝试DDL操作,则克隆操作将失败并显示错误。
clone_valid_donor_list
为远程克隆操作定义有效的供体主机地址。以逗号分隔的值列表允许采用以下格式: “ HOST1:PORT1,HOST2:PORT2,HOST3:PORT3”。不允许有空位。
克隆插件的限制:
DDL(包括TRUNCATE)在克隆操作期间不允许使用,但是允许并发DML。
无法从不同的MySQL服务器版本克隆实例。捐赠者和接收者必须具有相同的MySQL服务器版本。例如,您无法在MySQL 5.7和MySQL 8.0之间进行克隆。克隆插件仅在MySQL 8.0.17及更高版本中受支持。
mysqlx_port远程克隆操作不支持 指定的X协议端口 (在CLONE INSTANCE语句中指定捐赠者MySQL服务器实例的端口号时 )。
克隆插件不支持克隆MySQL服务器配置。收件人MySQL服务器实例保留其配置,包括持久化系统变量设置(请参见第5.1.9.3节“持久系统变量”。)
克隆插件不支持克隆二进制日志。
克隆插件仅克隆存储的数据 InnoDB。未克隆其他存储引擎数据。MyISAM并且 CSV存储在包括sys模式的任何模式中的表都被克隆为空表。
不支持通过MySQL router 连接到捐赠者MySQL服务器实例。
本地克隆操作不支持克隆使用绝对路径创建的常规表空间。与源表空间文件具有相同路径的克隆表空间文件将导致冲突。
下面是我在新节点上开了general_log看的的日志:
2019-07-24T12:38:32.589369Z 10 Query select USER()
2019-07-24T12:38:38.340499Z 10 Query SET GLOBAL clone_valid_donor_list = "192.168.2.4:20718"
2019-07-24T12:38:43.309861Z 10 Query CLONE INSTANCE FROM 'clone_user'@'192.168.2.4':20718 IDENTIFIED BY <secret>
开始克隆数据后,首先将本地的脏数据都清理掉。
2019-07-24T12:38:43.501527Z 10 Execute SET SQL_LOG_BIN = OFF
2019-07-24T12:38:43.501616Z 10 Execute SET FOREIGN_KEY_CHECKS=0
2019-07-24T12:38:43.504892Z 10 Execute DROP TABLE `db1`.`ttt`
2019-07-24T12:38:43.600006Z 10 Execute DROP TABLE `test`.`sbtest1`
2019-07-24T12:38:43.688042Z 10 Execute DROP TABLE `test`.`sbtest2`
2019-07-24T12:38:43.787856Z 10 Execute DROP TABLE `test`.`sbtest3`
2019-07-24T12:38:43.883940Z 10 Execute DROP TABLE `test`.`sbtest4`
2019-07-24T12:38:43.968045Z 10 Execute DROP TABLE `test`.`sbtest5`
2019-07-24T12:38:44.075932Z 10 Execute DROP TABLE `test`.`sbtest6`
2019-07-24T12:38:44.156114Z 10 Execute DROP TABLE `test`.`sbtest7`
2019-07-24T12:38:44.272188Z 10 Execute DROP TABLE `test`.`sbtest8`
2019-07-24T12:38:44.404281Z 10 Execute DROP TABLE `test`.`sbtest9`
2019-07-24T12:38:44.504446Z 10 Execute DROP TABLE `test`.`sbtest10`
2019-07-24T12:38:44.605156Z 10 Execute SET SQL_LOG_BIN = OFF
2019-07-24T12:38:44.605232Z 10 Execute SET FOREIGN_KEY_CHECKS=0
2019-07-24T12:38:44.605282Z 10 Execute DROP SCHEMA `test`
2019-07-24T12:38:44.636291Z 10 Execute DROP SCHEMA `db1`
2019-07-24T12:38:44.652277Z 10 Execute DROP SCHEMA `db2`
2019-07-24T12:38:44.660426Z 10 Execute DROP SCHEMA `db3`
2019-07-24T12:38:44.684278Z 10 Execute DROP SCHEMA `db4`
2019-07-24T12:38:44.692530Z 10 Execute DROP SCHEMA `dddddd`
2019-07-24T12:38:44.712261Z 10 Execute DROP SCHEMA `eeeeeeeee`
2019-07-24T12:38:44.728273Z 10 Execute DROP SCHEMA `ffff`
2019-07-24T12:38:44.755406Z 10 Execute DROP SCHEMA `gggg`
2019-07-24T12:38:44.797199Z 10 Execute SET SQL_LOG_BIN = OFF
2019-07-24T12:38:44.797253Z 10 Execute SET FOREIGN_KEY_CHECKS=0
然后关闭可能存在的slave,重置binlog和gtid信息
2019-07-24T12:38:44.797281Z 10 Execute STOP SLAVE
2019-07-24T12:38:44.797336Z 10 Execute RESET MASTER
2019-07-24T12:38:47.284210Z 9 Query select * from performance_schema.clone_progress
2019-07-24T12:38:49.648543Z 10 Query SELECT DATABASE()
2019-07-24T12:38:49.924911Z 9 Query select * from performance_schema.clone_progress
2019-07-24T12:38:50.691898Z 9 Query select * from performance_schema.clone_progress -- 系统自己在不断的查看复制的进度
重启mysqld进程
/root/opt/mysql/8.0.17/bin/mysqld, Version: 8.0.17 (MySQL Community Server - GPL). started with:
Tcp port: 8017 Unix socket: /tmp/mysql_sandbox8017.sock
Time Id Command Argument
2019-07-24T12:38:55.753776Z 7 Connect
2019-07-24T12:38:55.753958Z 7 Query SELECT @@skip_networking, @@skip_name_resolve, @@have_ssl='YES', @@ssl_key, @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_crl, @@ssl_crlpath, @@tls_version2019-07-24T12:38:55.761092Z 7 Quit
如果我们设置了log_error_verbosity=3时候,也可以在新节点的errlog里面看到整个过程:
# cat msandbox.err
2019-07-25T01:08:39.630934Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Task Connect.'
2019-07-25T01:08:39.660344Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Master ACK Connect.'
2019-07-25T01:08:39.660413Z 8 [Note] [MY-013457] [InnoDB] Clone Apply Begin Master Version Check
2019-07-25T01:08:39.660808Z 8 [Note] [MY-013457] [InnoDB] Clone Apply Version End Master Task ID: 0 Passed, code: 0:
2019-07-25T01:08:39.660844Z 8 [Note] [MY-013457] [InnoDB] Clone Apply Begin Master Task
2019-07-25T01:08:39.660991Z 8 [Warning] [MY-013460] [InnoDB] Clone removing all user data for provisioning: Started
2019-07-25T01:08:39.661011Z 8 [Note] [MY-011977] [InnoDB] Clone Drop all user data
2019-07-25T01:08:39.766425Z 8 [Note] [MY-011977] [InnoDB] Clone: Fix Object count: 181 task: 0
2019-07-25T01:08:40.839845Z 8 [Note] [MY-011977] [InnoDB] Clone Drop User schemas
2019-07-25T01:08:40.840110Z 8 [Note] [MY-011977] [InnoDB] Clone: Fix Object count: 9 task: 0
2019-07-25T01:08:40.933669Z 8 [Note] [MY-011977] [InnoDB] Clone Drop User tablespaces
2019-07-25T01:08:40.934618Z 8 [Note] [MY-011977] [InnoDB] Clone: Fix Object count: 6 task: 0
2019-07-25T01:08:41.024238Z 8 [Note] [MY-011977] [InnoDB] Clone Drop: finished successfully
2019-07-25T01:08:41.024285Z 8 [Warning] [MY-013460] [InnoDB] Clone removing all user data for provisioning: Finished
2019-07-25T01:08:41.108682Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Command COM_INIT.'
2019-07-25T01:08:41.215778Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State Change : Number of tasks = 1
2019-07-25T01:08:41.215831Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State FILE COPY:
2019-07-25T01:08:41.215983Z 8 [Note] [MY-011978] [InnoDB] Clone estimated size: 443.08 MiB Available space: 91.11 GiB
2019-07-25T01:08:41.895610Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Total Data: 347 MiB @ 512 MiB/sec, Network: 347 MiB @ 512 MiB/sec.'
2019-07-25T01:08:41.987709Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State Change : Number of tasks = 1
2019-07-25T01:08:41.987743Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State PAGE COPY:
2019-07-25T01:08:41.987825Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Total Data: 347 MiB @ 451 MiB/sec, Network: 347 MiB @ 451 MiB/sec.'
2019-07-25T01:08:42.091144Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State Change : Number of tasks = 1
2019-07-25T01:08:42.091178Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State REDO COPY:
2019-07-25T01:08:42.091495Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Total Data: 347 MiB @ 397 MiB/sec, Network: 347 MiB @ 397 MiB/sec.'
2019-07-25T01:08:42.199799Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State Change : Number of tasks = 1
2019-07-25T01:08:42.199842Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State FLUSH DATA:
2019-07-25T01:08:44.495823Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State FLUSH REDO:
2019-07-25T01:08:45.077473Z 8 [Note] [MY-013458] [InnoDB] Clone Apply State DONE
2019-07-25T01:08:45.077561Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Command COM_EXECUTE.'
2019-07-25T01:08:45.077848Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Master ACK COM_EXIT.'
2019-07-25T01:08:45.078263Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Master ACK Disconnect : abort: false.'
2019-07-25T01:08:45.078514Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Task COM_EXIT.'
2019-07-25T01:08:45.078823Z 8 [Note] [MY-013272] [Clone] Plugin Clone reported: 'Client: Task Disconnect : abort: false.'
2019-07-25T01:08:45.079025Z 8 [Note] [MY-013457] [InnoDB] Clone Apply End Master Task ID: 0 Passed, code: 0:
2019-07-25T01:08:45.986040Z 0 [Note] [MY-010067] [Server] Giving 2 client threads a chance to die gracefully
2019-07-25T01:08:45.986101Z 0 [Note] [MY-010117] [Server] Shutting down slave threads
2019-07-25T01:08:45.986124Z 0 [Note] [MY-010054] [Server] Event Scheduler: Killing the scheduler thread, thread id 4
2019-07-25T01:08:45.986154Z 0 [Note] [MY-010050] [Server] Event Scheduler: Waiting for the scheduler thread to reply
2019-07-25T01:08:45.986309Z 0 [Note] [MY-010048] [Server] Event Scheduler: Stopped
2019-07-25T01:08:47.986380Z 0 [Note] [MY-010118] [Server] Forcefully disconnecting 1 remaining clients
2019-07-25T01:08:47.986429Z 0 [Warning] [MY-010909] [Server] /root/opt/mysql/8.0.17/bin/mysqld: Forcing close of thread 8 user: 'root'.
2019-07-25T01:08:47.986549Z 0 [Note] [MY-010043] [Server] Event Scheduler: Purging the queue. 0 events
2019-07-25T01:08:47.987972Z 0 [Note] [MY-012330] [InnoDB] FTS optimize thread exiting.
2019-07-25T01:08:47.991525Z 0 [Note] [MY-010120] [Server] Binlog end
2019-07-25T01:08:48.005927Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'clone'
2019-07-25T01:08:48.005991Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'mysqlx_cache_cleaner'
2019-07-25T01:08:48.006009Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'mysqlx'
2019-07-25T01:08:48.006294Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'ngram'
2019-07-25T01:08:48.006323Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'BLACKHOLE'
2019-07-25T01:08:48.006346Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'ARCHIVE'
2019-07-25T01:08:48.006359Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'TempTable'
2019-07-25T01:08:48.006368Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'PERFORMANCE_SCHEMA'
2019-07-25T01:08:48.006413Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'MRG_MYISAM'
2019-07-25T01:08:48.006422Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'MyISAM'
2019-07-25T01:08:48.006441Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_SESSION_TEMP_TABLESPACES'
2019-07-25T01:08:48.006452Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CACHED_INDEXES'
2019-07-25T01:08:48.006460Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_VIRTUAL'
2019-07-25T01:08:48.006467Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_COLUMNS'
2019-07-25T01:08:48.006474Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TABLESPACES'
2019-07-25T01:08:48.006481Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_INDEXES'
2019-07-25T01:08:48.006488Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TABLESTATS'
2019-07-25T01:08:48.006496Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TABLES'
2019-07-25T01:08:48.006503Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2019-07-25T01:08:48.006510Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2019-07-25T01:08:48.006517Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_CONFIG'
2019-07-25T01:08:48.006524Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2019-07-25T01:08:48.006531Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_DELETED'
2019-07-25T01:08:48.006538Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2019-07-25T01:08:48.006546Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_METRICS'
2019-07-25T01:08:48.006552Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2019-07-25T01:08:48.006559Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2019-07-25T01:08:48.006567Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2019-07-25T01:08:48.006578Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_BUFFER_PAGE'
2019-07-25T01:08:48.006586Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2019-07-25T01:08:48.006593Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2019-07-25T01:08:48.006600Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMPMEM_RESET'
2019-07-25T01:08:48.006607Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMPMEM'
2019-07-25T01:08:48.006614Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMP_RESET'
2019-07-25T01:08:48.006621Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMP'
2019-07-25T01:08:48.006631Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TRX'
2019-07-25T01:08:48.006653Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'InnoDB'
2019-07-25T01:08:48.006688Z 0 [Note] [MY-013072] [InnoDB] Starting shutdown...
2019-07-25T01:08:48.006800Z 0 [Note] [MY-011944] [InnoDB] Dumping buffer pool(s) to /root/sandboxes/msb_8_0_17/data/ib_buffer_pool
2019-07-25T01:08:48.007193Z 0 [Note] [MY-011944] [InnoDB] Buffer pool(s) dump completed at 190725 9:08:48
2019-07-25T01:08:48.519041Z 0 [Note] [MY-013084] [InnoDB] Log background threads are being closed...
2019-07-25T01:08:48.941974Z 0 [Note] [MY-012980] [InnoDB] Shutdown completed; log sequence number 570942678
2019-07-25T01:08:48.945695Z 0 [Note] [MY-012255] [InnoDB] Removed temporary tablespace data file: "ibtmp1"
2019-07-25T01:08:48.945737Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'MEMORY'
2019-07-25T01:08:48.945764Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'CSV'
2019-07-25T01:08:48.945778Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'sha2_cache_cleaner'
2019-07-25T01:08:48.945790Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'caching_sha2_password'
2019-07-25T01:08:48.945810Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'sha256_password'
2019-07-25T01:08:48.945821Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'mysql_native_password'
2019-07-25T01:08:48.946811Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'binlog'
2019-07-25T01:08:48.949279Z 0 [System] [MY-010910] [Server] /root/opt/mysql/8.0.17/bin/mysqld: Shutdown complete (mysqld 8.0.17) MySQL Community Server - GPL.
2019-07-25T01:08:49.485978Z 0 [System] [MY-010116] [Server] /root/opt/mysql/8.0.17/bin/mysqld (mysqld 8.0.17) starting as process 42065
2019-07-25T01:08:50.853063Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-07-25T01:08:50.891055Z 0 [System] [MY-010931] [Server] /root/opt/mysql/8.0.17/bin/mysqld: ready for connections. Version: '8.0.17' socket: '/tmp/mysql_sandbox8017.sock' port: 8017 MySQL Community Server - GPL.
2019-07-25T01:08:51.150894Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/tmp/mysqlx-18017.sock' bind-address: '::' port: 18017