mysqldump

83 views
Skip to first unread message

Chakri Viswanadha

unread,
Aug 12, 2019, 9:45:21 AM8/12/19
to vitess
How do i load SQL dump in vitess sql shard setup? 

I'm evaluating vitess and as part of the evaluation, I'm trying to test,  taking database dump and load mysql dump file from existing mysql setup. 

Can you please point me to the procedure?  using docker-compose to bring up the cluster for evaluation. 

$ ./vitess.sh status
       Name                      Command               State                                                          Ports
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
compose_consul1_1     docker-entrypoint.sh agent ...   Up      8300/tcp, 8301/tcp, 8301/udp, 8302/tcp, 8302/udp, 0.0.0.0:8400->8400/tcp, 0.0.0.0:8500->8500/tcp,
                                                               0.0.0.0:8600->8600/tcp, 8600/udp
compose_consul2_1     docker-entrypoint.sh agent ...   Up      8300/tcp, 8301/tcp, 8301/udp, 8302/tcp, 8302/udp, 8400/tcp, 8500/tcp, 8600/tcp, 8600/udp
compose_consul3_1     docker-entrypoint.sh agent ...   Up      8300/tcp, 8301/tcp, 8301/udp, 8302/tcp, 8302/udp, 8400/tcp, 8500/tcp, 8600/tcp, 8600/udp
compose_vtctld_1      sh -c  $VTROOT/bin/vtctld  ...   Up      0.0.0.0:1093->15999/tcp, 0.0.0.0:15000->8080/tcp
compose_vtgate_1      sh -c $VTROOT/bin/vtgate - ...   Up      0.0.0.0:15306->15306/tcp, 0.0.0.0:1094->15999/tcp, 0.0.0.0:15099->8080/tcp
compose_vttablet1_1   sh -c /script/vttablet-up.sh 1   Up      0.0.0.0:1095->15999/tcp, 0.0.0.0:1098->3306/tcp, 0.0.0.0:15001->8080/tcp
compose_vttablet2_1   sh -c /script/vttablet-up.sh 2   Up      0.0.0.0:1097->15999/tcp, 0.0.0.0:1100->3306/tcp, 0.0.0.0:15002->8080/tcp
compose_vttablet3_1   sh -c /script/vttablet-up.sh 3   Up      0.0.0.0:1096->15999/tcp, 0.0.0.0:1099->3306/tcp, 0.0.0.0:15003->8080/tcp
- vtctld web ui:

- vttablets web ui:

- vtgate web ui:

Thanks,
Chakri

Sugu Sougoumarane

unread,
Aug 13, 2019, 4:04:23 PM8/13/19
to vit...@googlegroups.com
There's currently no direct way to dump a mysql file into vitess. It's something we've been looking at adding.
People have previously written wrapper scripts on the dump file to convert them into chunked inserts.
Others have uploaded those dump files directly into the underlying mysql. Of course, this is possible only if the keyspace is not sharded.

--
You received this message because you are subscribed to the Google Groups "vitess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vitess+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vitess/55287de6-b38c-460f-989e-3aeeca2547e3%40googlegroups.com.

Caio Abreu Ferreira

unread,
Jan 12, 2022, 3:25:41 PM1/12/22
to vitess
All

Migrating data into Vitess

(...)
3. Apply some simple transformations on the output
(...)

where can I find more information about necessary changes to the SQL file? information about what needs to be changed in the SQL file to be able to impose the data.

Reply all
Reply to author
Forward
0 new messages