Coming from the world of Digital Ocean and Amazon Web Services, I found Google Cloud to be a bit harder to access and use in conjunction with other non google services.

Problem: I need to import large mysql dump to google cloud sql for computation

  1. We can only import a file that is on google storage so we need to import the file to storage first before we can use it in Google SQL
  2. Datadump file (sql) is placed on the database server, it won’t be practical to download the dump and then upload it via Google Storage Uploader. We should probably send the file directly from server.
  3. Install Google Cloud SDK on the database server We’d need the google utilities on our terminal to send the files to the Google Cloud Bucket. In the utilities we’ll use the cp command.
  4. Find the dump file on server. It’s in /home/ubuntu/dumps
  5. Copy from there to Google storage gsutil cp file-name.sql.gz gs://swag-101
  6. Once the sql file is in storage, it can be used by any Google Cloud Platform Product.
Choose a Cloud Storage file to import into your Cloud SQL instance