Tuesday, October 8, 2013

Re: issues with mysqldump file import with views

While waiting Google Cloud Sql team to investigate, here is my work around in case anyone else run into the same issue.

1. Do the mysqldump to create the dump file
2. Upload to Cloud Storage and import to your Cloud SQL
3. Now we need to fix the views.  Use the mysqldbexport to export the schema definition.  You can't use mysqldump.  Delete all other definitions but views.  Remove the the ALGORITHM part from every create view statement.  Add before every create statement a drop view if exists statement.  Keep this file properly and amend it every time you add/drop a view.
4. Test it in your local mysql.
5. Upload and import.  Apparently, Cloud SQL knows how to import mysqldump and mysqldbexport files.

mysqldbexport is part of the Mysql Workbench, not with the Mysql server.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/6c2d75b6-bf0e-47b1-9ad3-3f74b8137e13%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment