## Playground used https://labs.play-with-docker.com/ ## donor1 [node1] (local) root@192.168.0.8 ~ $ docker run -d -P --name=donor1 -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -e MYSQL_PASWORD="""" -e MYSQL_ROOT_HOST="%" mysql/mysql-server:8.0.22 24689585bdc6fd79ee30b7495e66602d51e9ab99b03e5865b05dc34fec0be41e $ docker exec -it donor1 bash bash-4.2# mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 36 Server version: 8.0.22 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. 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.02 sec) mysql> create database d1; Query OK, 1 row affected (0.00 sec) mysql> use d1 Database changed mysql> create table t1(num int); Query OK, 0 rows affected (0.02 sec) mysql> \q Bye bash-4.2# echo "innodb_validate_tablespace_paths=OFF">> /etc/my.cnf bash-4.2# docker restart donor1 bash: docker: command not found bash-4.2# exit exit [node1] (local) root@192.168.0.8 ~ $ docker exec -it donor1 bash bash-4.2# exit exit [node1] (local) root@192.168.0.8 ~ $ docker restart donor1 donor1 [node1] (local) root@192.168.0.8 ~ $ [node1] (local) root@192.168.0.8 ~ $ docker exec -it donor1 bash bash-4.2# mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 Server version: 8.0.22 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show variables like 'innodb_validate%'; +----------------------------------+-------+ | Variable_name | Value | +----------------------------------+-------+ | innodb_validate_tablespace_paths | OFF | +----------------------------------+-------+ 1 row in set (0.01 sec) mysql> ### recipient1 [node2] (local) root@192.168.0.7 ~ $ docker run -d -P --name=recipient1 --restart=on-failure -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -e MYSQL_ROOT_PASSWORD="""" -e MYSQL_ROOT_HOST="%" mysql/mysql-server:8.0.22 Unable to find image 'mysql/mysql-server:8.0.22' locally 8.0.22: Pulling from mysql/mysql-server 03e20c09154c: Pull complete be7ba00cd800: Pull complete 218845b603a2: Pull complete 0807146aa37b: Pull complete Digest: sha256:5dfceab2e53e7dac983168c5f5d611d9d8e85c3bee7297c24c931d77fbeeaac3 Status: Downloaded newer image for mysql/mysql-server:8.0.22 a05070c0480a08420ac1a87127929be13d66758359c0d26b77504d68a478c5f9 [node2] (local) root@192.168.0.7 ~ $ $ docker exec -it recipient1 bash bash-4.2# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.22 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. 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.01 sec) mysql> set global clone_valid_donor_list='192.168.0.8:49164'; Query OK, 0 rows affected (0.00 sec) mysql> clone instance from root@192.168.0.8:49164 identified by ''; Query OK, 0 rows affected (2.71 sec) mysql> [node2] (local) root@192.168.0.7 ~ $ docker exec -it recipient1 bash bash-4.2# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.22 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select * from d1.t1; ERROR 1812 (HY000): Tablespace is missing for table `d1`.`t1`. mysql> -- Extract from recipient1 error log $ docker logs recipient1 [Entrypoint] MySQL Docker Image 8.0.22-1.1.18 [Entrypoint] Initializing database 2021-01-07T12:27:37.141825Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.22) initializing of server in progress as process 21 2021-01-07T12:27:37.150216Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-01-07T12:27:37.839064Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2021-01-07T12:27:39.229105Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. [Entrypoint] Database initialized 2021-01-07T12:27:42.381383Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 64 2021-01-07T12:27:42.403739Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-01-07T12:27:42.631514Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2021-01-07T12:27:42.799717Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock 2021-01-07T12:27:42.942435Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2021-01-07T12:27:42.942823Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2021-01-07T12:27:42.981293Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.22' socket: '/var/lib/mysql/mysql.sock' port: 0 MySQL Community Server - GPL. Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it. [Entrypoint] ignoring /docker-entrypoint-initdb.d/* 2021-01-07T12:27:46.437131Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.22). 2021-01-07T12:27:47.486719Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22) MySQL Community Server - GPL. [Entrypoint] Server shut down [Entrypoint] MySQL init process done. Ready for start up. [Entrypoint] Starting MySQL 8.0.22-1.1.18 2021-01-07T12:27:48.767625Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 121 2021-01-07T12:27:48.784624Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-01-07T12:27:48.980560Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2021-01-07T12:27:49.137641Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2021-01-07T12:27:49.258267Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2021-01-07T12:27:49.259035Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2021-01-07T12:27:49.295434Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.22' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL. 2021-01-07T12:56:08.735170Z 9 [Warning] [MY-013460] [InnoDB] Clone removing all user data for provisioning: Started 2021-01-07T12:56:08.872837Z 9 [Warning] [MY-013460] [InnoDB] Clone removing all user data for provisioning: Finished 2021-01-07T12:56:13.185308Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 9 user: 'root'. 2021-01-07T12:56:14.193621Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22) MySQL Community Server - GPL. [Entrypoint] MySQL Docker Image 8.0.22-1.1.18 [Entrypoint] Starting MySQL 8.0.22-1.1.18 2021-01-07T12:56:15.667475Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 24 2021-01-07T12:56:15.679266Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2021-01-07T12:56:16.063921Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2021-01-07T12:56:16.209120Z 1 [Warning] [MY-012351] [InnoDB] Tablespace 2, name 'd1/t1', file './d1/t1.ibd' is missing! 2021-01-07T12:56:16.394008Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2021-01-07T12:56:16.528532Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2021-01-07T12:56:16.528973Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2021-01-07T12:56:16.562083Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.22' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL. 2021-01-07T12:56:50.699420Z 8 [ERROR] [MY-012592] [InnoDB] Operating system error number 2 in a file operation. 2021-01-07T12:56:50.699813Z 8 [ERROR] [MY-012593] [InnoDB] The error means the system cannot find the path specified. 2021-01-07T12:56:50.700241Z 8 [ERROR] [MY-012216] [InnoDB] Cannot open datafile for read-only: './d1/t1.ibd' OS error: 71 2021-01-07T12:56:50.700617Z 8 [Warning] [MY-012049] [InnoDB] Cannot calculate statistics for table `d1`.`t1` because the .ibd file is missing. Please refer to http://dev.mysql.com/doc/refman/8.0/en/innodb-troubleshooting.html for how to resolve the issue.