0
votes

I am trying to import a table in a newly created instance in google MySQL cloud but I get the following error message:

Error 1142: INSERT command denied to user 'cloudsqlimport'@'127.0.0.1' for table

When I try to grant the privileges to cloudsqlimport from cloud sql console:

mysql> UPDATE `mysql`.`user` SET `insert_priv` = 'Y' WHERE `User` = 'cloudsqlimport';
ERROR 1142 (42000): UPDATE command denied to user 'root'@'104.xxx.xx.xx' for table 'user'

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'

Same issue when I try to grant the 'insert_priv' through MySQL workbench

How can I resolve this issue?

1
you wouldn't get much help in such issues as Cloud SQL includes a lot of internal work and the best way to get assistance in your case in to contact support by following this cloud.google.com/support/docs/manage-casesMethkal Khalawi

1 Answers

0
votes

This error might be due to one of the following causes:

1- Lack of permissions

2- Database or Table spelled wrongly.

3- User correctly spelled but the IP is not correct.

To see the permissions your user has, Please log into MySQL prompt with your user, and run the following command:

SHOW GRANTS;

This will show you the privileges (grants in MySQL) that the current user has. Please check if you have INSERT privileges for the given table.