How can I send an .so file to a MySQL instance on Google Cloud? - mysql

I am actually using an aggregate User Defined Function (UDF) and I have compiled a shared object file (.so).
In my local instance it is all right. I just pushed the file to my /usr/local/mysql/plugins folder.
The problem is: Now I have to push the UDF file to my remote instance running in google cloud and I have no idea how can I do that. I have searched a lot and didn't find any answer.
Does anyone have a clue about how it can be done?

Google Cloud SQL does not support UDFs.

Related

Can GoogleSheet write json to local folder in computer automatically by apps script?

I would like to write json files to the local computer( D://MyJsons ) by apps script.
(I've already wrote the code to get json string. I just need a way to write to the local folder)
I've found DriveApp.createFile to write to google drive, but not found a way to save in the local computer.
Is that possible?
Apps Script only work in the cloud, it has no access to your local storage. The best way to do it would probably to setup a synced folder between your computer / server and your drive.

How do I connect my custom auth script to ejabberd?

I have searched everywhere that I can think of for this. I know how to create my custom auth script (I am using Python) but I just can't figure out how to connect it to the ejabberd server. Does it have to be in a special location? Special name? Do I point to it from ejabberd.yml in some way?
What triggers ejabberd to call my script instead of its own internal auth code?
In ejabberd.yml tell that you want to use external as authentication method, and also provide the full path to your script, see
https://docs.ejabberd.im/admin/configuration/#external-script

How to upload a CSV file in a microservice deployed in cloud foundry

I am new to cloud foundry. I am currently working on a requirement where I have to upload a CSV file (via JSP UI) into a service deployed in cloud foundry and persists its data in service.
The issue is from UI, I only get a local path of that CSV file and when I am trying to parse that CSV via this path the file is not recognized. I guess the reason is service is already deployed in CF, so it does not recognize this local machine path.
Can you please let me know how can I parse this CSV file in local machine and where to parse this CSV.
Thanks in Advance!
There is nothing specific to Cloud Foundry about how you would receive an uploaded file in a web application. Since you mentioned using Java, I would suggest checking out this post.
How to upload files to server using JSP/Servlet?
The only thing you need to keep in mind that's specific to Cloud Foundry is that the filesystem in Cloud Foundry is ephemeral. It behaves like a normal filesystem and you can write files to it, however, the lifetime of the filesystem is equal to the lifetime of your application instance. That means restarts, restages or anything else that would cause the application container to be recreated will destroy the file system.
In short, you can use the file system for caching or temporary files but anything that you want to retain should be stored elsewhere.
https://docs.cloudfoundry.org/devguide/deploy-apps/prepare-to-deploy.html#filesystem

How to upload user defined function to Google cloud MySQL instance

I am running a MySQL database instance on Google Cloud, and I am currently trying to upload a shared library file (my_library.so) to my plugin directory, so that I can declare it as an user-defined function to call in MySQL queries.
Does someone know how to do it?
It seems that the Google cloud console does not give me access to the files in my instance. Also, I have not been able to upload it using MySQL workbench.
Thank you
Cloud SQL does not support uploading compiled code.

Shift from phpmyadmin as Server to Google Cloud platform as server?

Currently I am using PhpMyAdmin as my server. Now I want to shift to Google cloud as my server.
I have few php files which are called as url from android app, these php file connects to mysql database and returns result back. Relative paths of images are stored in the database and these images are stored on server.
I am not able to figure out how I can perform same thing with Google cloud. I tried to upload same php file on google cloud and database to google cloud sql. But, I don't know how to access relative path images or individual php files, and I am lost as I am new to Google cloud.
Can someone please help? Thank you!
You'll probably want to use Google Cloud Storage:
https://cloud.google.com/appengine/docs/php/googlestorage/
Your site users can't upload their files directly to App Engine, so you can let them upload to Cloud Storage and then keep the metadata in your Cloud SQL.