importing database doesn't create views/functions/procedures -- how to programatically create them?

11 views
Skip to first unread message

Tim Holme

unread,
Oct 7, 2019, 3:35:23 PM10/7/19
to Google Cloud SQL discuss
When importing data into a Cloud MySQL, the documentation says that triggers, stored procedures, functions, and views must be recreated manually. What is a way to do create views/functions/procedures/events/triggers programatically (via script or program) so I don't have to do this literally manually for hundreds of views, procs, functions, etc?

George (Cloud Platform Support)

unread,
Oct 10, 2019, 12:57:42 PM10/10/19
to Google Cloud SQL discuss
Hello Tim, 

As you rightly point out, documentation indicates you need to re-create triggers manually, that is: if you export and then import data. Depending on your use-case and practical needs, you might be able to rather replicate your data to another MySQL instance by setting up replication. This can be accomplished in practice from your Cloud SQL instance directly to a Cloud SQL instance, or using the external master feature as an intermediate step.

This discussion group is oriented more towards general opinions, trends, and issues of general nature touching App Engine and Cloud SQL. For coding and programming architecture, as well as exporting and importing MySQL data, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help. 
Reply all
Reply to author
Forward
0 new messages