Export database feature

65 views
Skip to first unread message

Maxim Darii

unread,
Feb 7, 2020, 12:24:20 PM2/7/20
to Google Cloud SQL discuss
Hello all,

Using gcloud utility is possible to export mysql databases to a bucket, but exported file contains instructions like "use database", and when we need to restore same dump but to another database we have to edit file. 

Is possible to add to gcloud sql export command additional flags equivalent to mysqldump flags: --no-create-db

David (Cloud Platform Support)

unread,
Feb 11, 2020, 3:21:09 PM2/11/20
to Google Cloud SQL discuss

Hello,


In order to avoid this error without editing the file, the database you are specifying in your export command must already exist in the instance you are importing the data into and it must be empty. it is not possible to add a flag such as “--no-create-db”. However, if you are interested in seeing this as a new feature, you could create a feature request using the Google Issue Tracker.

Reply all
Reply to author
Forward
0 new messages