-
Install MySQL if necessary Please refer to the doc to install MySQL by using homebrew.
-
Create source table
Create table test(id number, col1 char(30), col2 char(30));
- Create cloud bigtable table by using cbt
cbt createtble test
cbt createfamily test cf1
-
Configure source MySQL instance: IP, user, password, etc. Please refer to the doc
-
Start the
canal
Please refer to the doc
- Configure target Cloud Bigtable: projectId, instanceId, tableId, etc in the simple.conf file.
- Start the simple canal client
mvn package assembly:single
java -jar xxx.jar
mysql> insert into test values(1111, "mike","kushimoto");
mysql> commit;
cbt -project learning-centre -instance test read test;
mysql> update test set col2="Osaka" where id=111;
mysql> commit;
cbt -project learning-centre -instance test read test;
mysql> delete from test where id=111;
mysql> commit;
cbt -project learning-centre -instance test read test;
Please help to ignore the operations from maintenance in Cloud SQL for MySQL