Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud SQL import - ERROR: HTTPError 403: The client is not authorized to make this request

I trying to import a database stored in the Cloud Storage using the command:

gcloud sql instances import instance-name gs://connect-to-the-cloud-sql.appspot.com/my-cloud-sql-instance-backup

But, I am getting error:

ERROR: (gcloud.sql.instances.import) HTTPError 403: The client is not authorized to make this request.

I've already logged in using:

gcloud auth login
like image 747
Beginner Avatar asked Sep 30 '17 15:09

Beginner


2 Answers

Make sure the instance-name is correct. I had the same error, it went away as soon as I corrected the instance-name.

like image 155
ktang Avatar answered Oct 21 '22 17:10

ktang


I had this problem, my instance name was correct. Turns out I was in the wrong GCP project. Make sure you switch to the correct [target] project or use the project argument:

gcloud sql instances export my-cloud-sql-instance gs://connect-to-the-cloud-sql.appspot.com/my-cloud-sql-instance-backup --project=<your target project>
like image 29
kip2 Avatar answered Oct 21 '22 16:10

kip2