error to grant file permission in root.

816 views
Skip to first unread message

MeuSped Solução em processamento de dados

unread,
Jun 18, 2019, 8:38:23 PM6/18/19
to Google Cloud SQL discuss
Error while grant privileges to user root.
I need to use outfile to create a archive. but the user root does not have this permission.
I entered like a root and run the following commands

mysql> grant file on cnpj.cnpj to 'root'@'%';
ERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES)

mysql> grant all on cnpj.* to 'root'@'%';
Query OK, 0 rows affected (0.01 sec)

mysql> grant update on cnpj.* to 'root'@'%';
Query OK, 0 rows affected (0.01 sec)

mysql> grant file on cnpj.* to 'root'@'%';
ERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES)

Have success to grant all privileges less FILE... 


Please I would like receive help to fix my doubts

Dan Charrois

unread,
Jun 18, 2019, 8:56:43 PM6/18/19
to 'Fady (Google Cloud Platform)' via Google Cloud SQL discuss
Granting the FILE privilege would give access to the local file system to read and write data. Though you can do this with MySQL on a virtual machine in Compute Engine, for example, Cloud SQL only gives access to SQL itself, not the underlying instance.

I don't have a definitive Google reference doc to cite, but I suspect that is why you can't grant FILE privileges on a Google Cloud SQL instance.

Dan
> --
> You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/34552f7a-d4f1-4a94-9e7a-67bd0a26e459%40googlegroups.com.

Harmit Rishi (Cloud Platform Support)

unread,
Jun 20, 2019, 9:43:41 PM6/20/19
to Google Cloud SQL discuss
Hello, 

The Cloud SQL product is a fully Google managed database service. Due to this, the privileges such as SUPER and FILE are not available for the root user account. You may find further details of the root user account for Cloud SQL here

However, as Dan mentioned, if you would like these privileges you may consider using a SQL instance on a Compute Engine VM. You may find the steps to on how to do this here.

I hope this helps!  

MeuSped Solução em processamento de dados

unread,
Jul 17, 2019, 7:32:07 PM7/17/19
to Google Cloud SQL discuss
Thanks for your answers.
I will solve it through the same application.
Reply all
Reply to author
Forward
0 new messages