Forum Stats

  • 3,757,668 Users
  • 2,251,254 Discussions
  • 7,869,883 Comments

Discussions

Bulk loading of data when using InnoDB cluster

user619241
user619241 Member Posts: 17 Blue Ribbon

I am in the process of creating new InnoDB cluster. And I need to handle bulk loading of data to the new InnoDB cluster for existing MySQL database migration. I reviewed this document - How to handle Bulk Loading of Data when using MySQL Group Replication (GR) / InnoDB Cluster (Doc ID 2528459.1). The document does not give detailed information about how to handle bulk loading of data, except for an outline of steps. I have no idea of those step details. Can someone please point out a more detailed document of how to handle bulk loading of data to InnoDB Cluster?

Thank you!

Xinhuan

Tagged:

Answers

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 361 Employee

    This does depend on the format of your data. If you have tab separated, comma separated, or JSON formatted data, the fast way would be to use the MySQL (mysqlsh) and its parallel bulk loading utility. Seehttps://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-parallel-table.html and https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-batch-code-execution.html

    You can also have one node of the cluster running when you load the data and then use the clone plugin to bring the other two or mode nodes online. Or have the entire cluster of nodes running and load onto the primary, letting group replication handle the other nodes.

    If you have the output of a mysqldump, util.dumpinstance() from mysql, or a saves set from MySQL Enterprise backup, then proceed as you would normally for a restoration.

    Dave Stokes

    MySQL Community Manager

  • user619241
    user619241 Member Posts: 17 Blue Ribbon

    > You can also have one node of the cluster running when you load the data and then use the clone plugin to bring the other two or mode nodes online. 

    What can I do to have one node of the cluster running? What is the clone plugin?

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 361 Employee

    To have an working cluster you need three nodes. However to seed the dat you do not need to have all three nodes running. You can start one node, load the data, and then bring the others online. As you bring the second and third nodes online, they will ask if you wish to take advantage of the Clone plugin which will very quickly copy InnoDB table spaces over from an established system to the new replica. Clone is a ve3ry fast way to bring the cluster online and does not require backup the the dat on a primary and then reloading on the replicas.

    Dave Stokes

    MySQL Community Manager