Friday, May 7, 2021

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

Hi all 

How to set alerts when cloud sql exports to gcp every 4 hours  if failed how to get notifications set for email if exporting not successfully done to gcs 

How to set alerts to solve the problem 

On Thu, 6 May 2021 at 12:40 PM, 'Rajesh Golla' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hi Elliot,

Option3 is work around and I want to execute that select command using stored procedure and need to schedule it.

Anyways I got a approach with cloud function and cloud scheduler.

Thanks for the help

On Wednesday, May 5, 2021 at 8:56:49 PM UTC+5:30 Elliott (Google Cloud Platform Support) wrote:

Hello,


I understand that you would like to restore data from Cloud SQL to a Cloud Storage bucket but you are receiving Error 1227[1]. I was able to find an explanation indicating that this operation needs a Super User permission[2] that a managed Cloud SQL does not offer at this moment.

I was able to find this document[3], which describes how to generate a CSV from Cloud SQL as an alternative.

Would this be a sufficient workaround for you? I know this must be frustrating not to have technology not behaving as you wish. Please let us know your thoughts.

I would believe that the community may offer further advice or other ways to accomplish what you would like to do in another way in addition to the one I suggested.


[1] https://forums.mysql.com/read.php?10,674692,674692

[2] https://www.virtual-dba.com/blog/mysql-error-1227-access-denied/#:~:text=The%20reason%20MySQL%20throws%20error,the%20user%20importing%20the%20data.

[3] https://cloud.google.com/sql/docs/mysql/import-export/exporting



On Wednesday, May 5, 2021 at 9:11:43 AM UTC-4 rgo...@ctepl.com wrote:
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/2aa60a85-477d-49fa-88ae-7c34fe0d9becn%40googlegroups.com.
--
Regards
Biswanath Giri
Mob:9560016514

--
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/CAEJ8qt-PB77YFaVOTnFdJcOA1-F5nYmq4PgNhDxckT7wauvQOw%40mail.gmail.com.

No comments:

Post a Comment