Wednesday, May 5, 2021

[google-cloud-sql-discuss] Export from CloudSQL to CSV using select * into outfile

Hi,

I am trying to generate csv file from cloudsql and place in cloud storage using below query:

select * INTO OUTFILE 'Cloudstorage_path/test.csv'         FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'         LINES TERMINATED BY '\n' from Table limit 10

But I am getting below error:
Error Code: 1227. Access denied; you need (at least one of) the FILE privilege(s) for this operation

Please confirm whether we can use this approach to push data from cloudsql to cloud storage.

--
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-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/00e0dd1e-809b-409f-a7dd-bfa5feedb957n%40googlegroups.com.

No comments:

Post a Comment