0
votes

I am trying to import several sql files to sql cloud database. The import action using gsutil is met with this exception

C:\Program Files (x86)\Google\Cloud SDK>gcloud sql instances import prova0 gs:// bucket_tmp/00005tickerwoeu.sql --database=prova0 Importing Cloud SQL instance...done. ERROR: (gcloud.sql.instances.import) Operation https://www.googleapis.com/sql/v1 beta3/projects/ivory-folder-123456/instances/prova0/operations

/89d123456-5b06-aec2-fb0ee65 is taking too long

While if I use the console.developers interface for import it does not work as it should. It claims to be running (and probably does as I see an increase of 30 mb in db size in one hour) or simply raises a

"An unknown error occurred" error.

Background: I have a D1 database with 5 gb in it (the inserts in the mysqldump extend the bigger tables). The database was originally in MyISAM format, but I changed the two main tables to InnoDB (in sql-cloud db) after importing a dump raised a "mysql_query Incorrect key file for table './prova0/tickers.MYI'; try to repair it" error.

All the inserts are on the tables for which I changed the engine, and the problems importing start to happen after the change.

When I query the tables I seem to get the right output. But why are inserts no longer working/working at 500kb/min (they comprise varchar, integers and dates)?

1

1 Answers

0
votes

Cloud SQL provides suggestion if import takes too long:

https://cloud.google.com/sql/docs/import-export#longproc