Cloud SQL import issues

140 views
Skip to first unread message

aman kohli

unread,
Dec 21, 2020, 4:15:02 AM12/21/20
to Google Cloud SQL discuss
When I try to import the data from cloud storage, I get the following message
Error 1142: INSERT command denied to user 'cloudsqlimport'@'127.0.0.1' for table 't1'  

When I try to grant insert privileges to cloudsqlimport from mysqlworkbench or 
cloud shell > mysql>
UPDATE `mysql`.`user` SET `Grant_priv` = 'Y' WHERE `User` = 'root';
ERROR 1142 (42000): UPDATE command denied to user 'root'@'104.xxx..xx.xx' for table 'user'  

Is there any way to grant these privileges to cloudsqlimport?

Documentation says 
  1. You can optionally specify a user to use for the import.
Where/how I can specify the schema table owner as a user to use for the import?

Any other guidance here?

Thanks

Andrew Cooper

unread,
Dec 22, 2020, 9:24:30 AM12/22/20
to Google Cloud SQL discuss
Several issues can lead to this error message. It can also be related to an incorrect declaration of the database or schema name. For the import IAM permissions, you can refer to this user guide [1].

If using `gcloud` to deploy your Cloud SQL instance [2], then adding `--verbosity=debug` [3] will help debug any issues.

Reply all
Reply to author
Forward
0 new messages