Skip to content
Advertisement

Is there a way/service to get SQL statements that would input all the values of a database into another when inputting a database? [closed]

I have a local SQL database that I want to move onto google cloud’s MySql service but I don’t see a way to copy a database into their program. I can write into a new database but I don’t know how to turn one database into lines of code that would insert the lines into a new database. Is there any service that would turn a database into the lines of SQL that are needed to make a new one? Something similar to https://www.convertcsv.com/csv-to-sql.htm but with databases and not CSV files. Any help would be greatly appreciated!

Advertisement

Answer

Google has a free (note that the migration is free, the database it puts your data in is not) managed service called “Database Migration Service” that can move all your data for you and set up the Cloud SQL instance.

https://cloud.google.com/database-migration

The UI in the console is here:

https://console.cloud.google.com/dbmigration/migrations

The hard part is making sure that the two database locations can talk to each other. That means opening up holes in your firewall where your database is currently living to enable Cloud SQL to talk to it, and enabling the Cloud SQL instance to talk securely to your old database. The UI walks you through all this.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement