Accessing Azure MySQL service - mysql

I'm having problem trying to access the MySQL server (I'd like to replace a table with another) provided as part of the Windows Azure service. I have downloaded the publishsettings XML file, and the closest thing that I can find is 'Data Source=us-cdbr-azure-east-a.cloudapp.net;'. However, it's not accessible from the web browser, so I'm not sure what to do next.

You can get the full connection string from the dashboard of your Azure Web Site
Then you can use those credentials in a MySQL administration program, such as MySQL Workbench.

Related

Connecting to azure's "MySQL in app" database through a remote console

I have a web app in azure, of the MySQL in app type, it is a server with an instance of MySQL but the problem is that I can only manage the DB with PHPMyAdmin and I prefer to use the shell, so my question would be where can I verify the host, the user and the password that I must use to access from a console remotely?
According to this original App Service announcement for in-app MySql in 2016:
MySQL database cannot be accessed remotely. You can only access your
database content using PHPMyadmin or using MySQL utilities in KUDU
debug console.
And also
The database is protected by our sandbox environment and hence cannot
be accessed remotely through MySQL workbench or MySQL command line
tools (running on remote machine).
It would appear that this limitation is still in place.
For anyone who stumbled on this, to access the DB using PHP, use
https://name-of-your-site.scm.azurewebsites.net/phpmyadmin/index.php
Took me a while to find it,
You should get all these information looking in your Azure Portal, the "SQL Databases".
In the Overview menu, you'll get a Connection strings link with all the information you need.
Edit: and then you will be able to use this Connection Strings inside your application.

Connect Google Data Studio to Local Mysql Server

I have started using Google's Data Studio I found it very easy to turn the Excel data into Intuitive Business Dashboards with little or no coding skills.
But I have a problem here, whenever I try to connect to Mysql DB (running on my local system) I'm facing error.
Connection Details:
Error Message:
I tried googling the Error Code but No luck.
But I'm able to access the local Mysql Server from Mysql Workbench.
What is that I am missing here? Data Studio Heros?
Thanks in advance.
Simple answer: To expose a localhost service to the web, you have to use ngrok.
For your MySQL the command is:
ngrok tcp 3306
Then the hostname you have to use data studio will be displayed.
Google Data Studio operates on the Web, thus does not have access to your personal local network. However,
You may make you MySQL db Engine accessible to the web by changing the bind-address parameter (See on MySQL Workbench, Instance > Option File > Networking > General > bind-address) to 0.0.0.0.
You also need to create a new user allowed to connect from Hosts Matching %, since Google Data Studio servers are using a dozen of different IP addresses (https://support.google.com/datastudio/answer/7088031?hl=en)
Please refer to this question:
How to make mySQL database at my local accessible from different machines?
Please note that this is a bad practice to open an access to your personal computer and you may instead want to use a MySQL or MariaDB cloud service such as https://console.cloud.google.com/launcher/details/bitnami-launchpad/mariadb
You cannot put host address as localhost.
1) You will need to check your device address at whatismyip.com or something like that.
2) Second thing you need to check is if your device is under firewall or not.
You can refer below URL for more information
http://qsok.com/x/KIBr
As Will mentioned above, it's best practise to use cloud service such as Google Cloud itself to host your MySql database and then take the connection there.
When you connect your database to Data Studio you need to open firewall for all the IP addresses it uses. You can find the whole list of IPs on the bottom of this support article https://support.google.com/datastudio/answer/7088031?hl=en
If your database is behind a firewall, you will need to open access to
the all of the following IP addresses. These are used by Data Studio
to connect to and query your MySql database.

Can't attach MySQL database with my web application

I am using the vmc tool to upload my web application to cloudfoundry. I have pushed my web aplication and created service to bind with. But I am getting a problem in tunneling it. I want to connect my database stored in backup file in my system with my web application. Here is the image where I entered the commands:
I am having an error about path. I don't know how to resolve this. Please let me know how I should attach my databse with my web application.
What the error is saying is that you need to have MySQL client on your build path. Caldecott (the application which gets executed when you type vmc tunnel) uses your own client for either MySQL, Postgres or Redis. If you do not have MySQL client installed or if you do not have it defined in your PATH environment variable, you will get this error.
This is probably not it but there's a space in your password string in the screenshot provided.
Besides that it seems that this error may be generated if the "build path" used for connecting to the database is incorrect. Manually check if the tunnel to the database works fine with those credentials and/or check to see if VMC can access other databases.

How to write to a remote DB from an android app

We have an android app that currently sends data to a php script which writes to a mysql DB on the same server. We are thinking of using a scalable DB server e.g. FathomDB (which is just based on amazon RDS & rackspace) so that we can handle load increases easily.
The question is how does our android app write to these remote DBs? Do they have some kind of rest API, or allow you to have a php script similar to the one we have in place at the moment?
I'd say most of services like these have a connector running on the web, like the one you are using. But some of the services you mention (for example amazon rds) have a native mysql connection. So you can connect using mysql to the server and run queries like you currently do in php. You can use ACL to ensure security in your application :)

how to connect mysql server on external server in j2me application

I have a hosting account at godaddy ruinning Linux. Is has MySQL. I am creating a J2ME application that runs on android and I was wondering if there is any simpler way to connect from j2me application to my MySQL server?
Is it required to install anything at my server? which I cannot do because of the shared account. Any way to just open the connection, update some data in the MySQL from j2me application?
It is quite simple. You just need to do HTTP application/x-url-form-encoded request on the midlet and set request property to HTTP.POST. Then stream form data as bytes. Receive those post variable using a server side language (i used PHP) like $_POST['var'] and in that server script write MySQL query like insert into .. VALUES.. etc.
I don't know if any DB drivers exist for J2ME. If you can't find them just make layer on the server and implement your own protocol for retrieving data via http or sockets