title: loading data to a Cloud SQL on from bucket using curl (Google Cloud platform)
body: <p>I am trying to import data from a csv file to my cloud sql instance. I have managed to load the csv file into a bucket. I am following the instructions given in the below page.</p>
  
  <p><a href="https://cloud.google.com/sql/docs/mysql/import-export/importing" rel="nofollow noreferrer">https://cloud.google.com/sql/docs/mysql/import-export/importing</a></p>
  
  <p>The five instruction are:</p>
  
  <ol>
  <li><p>Create a Cloud Storage bucket, if you haven't already.  </p></li>
  <li><p>Upload the CSV file to your bucket.</p></li>
  <li><p>Provide your instance with read permissions to your bucket.</p></li>
  <li><p>Import the file using:</p></li>
  </ol>
  
  <p>ACCESS_TOKEN="$(gcloud auth application-default print-access-token)"
  curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
       --header 'Content-Type: application/json' \
       --data '{"importContext":
                    {"fileType": "CSV",
                     "uri": "gs:///",
                     "database": "",
                     "csvImportOptions":
                          {"table": ""}}}' \
     -X POST \
     <a href="https://www.googleapis.com/sql/v1beta4/projects/[PROJECT-ID]/instances/[INSTANCE_NAME]/import" rel="nofollow noreferrer">https://www.googleapis.com/sql/v1beta4/projects/[PROJECT-ID]/instances/[INSTANCE_NAME]/import</a></p>
  
  <ol start="5">
  <li>If you do not need to retain the permissions provided by the ACL you set previously, remove the ACL.</li>
  </ol>
  
  <p>I am unable to understand what to do in step 3 which is "Provide your instance with read permissions to your bucket." How do I provide my instance which read permission? </p>
  
  <p>Also in step 4, what is the significance of Access token and what does it do?</p>