How to upload user defined function to Google cloud MySQL instance - mysql

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.

Related

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

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.

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

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.

Google Cloud SQL: keeping dev and live databases updated

I have a local MySQL dev instance that I've been developing with and now I want my local MySQL table changes to be made in the live Google Cloud SQL instance that I have connected in my Google Plugin for Eclipse. I can't figure out how to do this except for a full dump and import. Is there another/better way? Ideally, database versioning would be great, but I don't think that exists with Google Cloud SQL.

Online music Streaming with GWT

I need to develop an application that is hosted in Google App Engine and access mysql database that is hosted in separate server which is not enable RMI or tomcat installed. Data(music files) stored in same server and for music files paths are stored in mysql database. Users can select music category and play them.
Just like - http://www.the-music-collective.com/listen/MP3Player.html
![alt text][1]
My questions are,
What technology I can use to access the mysql database?
Can I upload music files to the server via client interface?
The site you mentioned is using this javascript library:
http://www.schillmania.com/projects/soundmanager2/
and it's wrapped with GWT by JSNI or by library mentioned by stan229: http://code.google.com/p/gwt-sound
You can read more about this here:
http://googlewebtoolkit.blogspot.com/2009/03/giving-your-gwt-application-voice.html
Add 1) According to this two questions:
Can I use a MySQL database with an App Engine applicationand this:
App Engine and MySQL
you can't connect to a mysql database directly, but you can expose web service that will connect you with db.
Add 2) Yes you can upload any files through client. You can use this widget:
com.google.gwt.user.client.ui.FileUpload or this library: http://code.google.com/p/gwt-upload/
Well, you need something server-side. Why not PHP? Will they let you have PHP on that server? You could then write a simple script to give you feeds of data you need. Just be careful and secure it.
Regarding uploading music, you can handle this with PHP as well.
For the Client you will need something like GWT-Sound http://code.google.com/p/gwt-sound/
For the URL you would need to call some kind of server that returns the stream of data from mysql on a GET