I need help moving our database from MariaDB 10.3 (running on Galera cluster) to Google CloudSQL MySQL. The replication is mostly working but we keep running into problems.
Main Issues We’re Facing:
Some tables show up on the source MariaDB but are missing on the MySQL CloudSQL target
Used this export command but still having issues: mysqldump --master-data=2 --single-transaction --quick --opt production_db > production_db.sql
Can’t modify the live MariaDB database just to fix replication
Questions:
What’s the best way to deal with schema differences between MariaDB and MySQL during replication?
Can Google Database Migration Service help with this?
We have over 900 tables so doing this manually isn’t an option. Anyone have experience with this kind of migration?
had the same issue last year switching to CloudSQL. make sure to include --compatible=mysql and --skip-extended-insert in your mysqldump. we also found missing tables due to incompatible storage engines. check if your missing tables are using anything other than InnoDB.
Google Database Migration Service works great for this. We did a similar MariaDB to CloudSQL migration and it handled schema conversion automatically. Run the pre-migration assessment first - it’ll catch compatibility issues upfront. For missing tables, check if you’ve got MyISAM tables or MariaDB-specific stuff like virtual columns. DMS converts most of these but some need manual fixes. Turn on binlog replication monitoring during migration to catch sync issues early. Way better than trying to dump 900+ tables manually.