Connect Google Data Studio to Local Mysql Server - mysql

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.

Related

Accessing Mysql Database from a Machine to another machine using an application

So, I basically made a Windows Application using Visual Studio 2019, and used MySQL as my database to store records.
Now I want to publish that application and send it to a client or try to run it on a different machine, but i think since i have used the localhost as my database connection it wont be able to read or write data on my database from another machine.
So basically I want to know how can i host my mysql database on a machine and access that database from another machine using an application.
I am unable to find any sort of guide to do it online, if someone can guide me or give me a referrence from where I can get information and solve my issue.
You can expose your localhost to be accessed remotely, However, this is not ideal or advised. I will suggest you host your database on one of the virtual or cloud services and access it in your application.
Examples of services like https://remotemysql.com/ https://www.db4free.net/ which I advice you use for testing purpose only. You can create your database and they will give you the connection parameters to fill your connection string.
Let me know if is helpful.

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.

Can't Connect to Amazon RDS MySQL Instance from anywhere Except Home

I am working on a school project in which we need to perform Statistical Analysis in R. For the sake of the project, I have created an Amazon Web Services RDS MySQL instance, that I would like to share with my colleagues.
I have already uploaded the data that we need for our project in the database and can connect to the instance via both the MySQL Client and R from home. However, I cannot connect from either School or any Local Café via either the MySQL Client or any Local Café.
I have configured the Security Group so that anyone can access the database (both Inbound & Outbound). The Port that I use is 1433.
Anybody has an idea how I can resolve the problem?
Can you try with this Security Group rule: 0.0.0.0/0 ?
It looks like it is because of your os firewall. Can you check that by disabling your own firewall?

Can app on GAE(google app engine) access Mysql server host on VPS/dedicated server?

One of my small python web app hosts on GAE
but I prefer to change its database to Mysql.
GAE database is too special which rely on GAE and not good for future migration.
Can python app on GAE(google app engine) access Mysql server host on VPS/dedicated server?
(of course they are not in same local network with GAE)
if sure, what need to care(firewall, port policy and all others) for Mysql server being open to web?
Sure.
Open the single port needed (3306) inside your firewall of choice.
Always install relevant security updates to the mysql server software as soon as possible.
Create a new mysql user for access from your GAE instance.
Possibly restrict access for this user to one single IP inside of mysql.
(If this is true, you can also enforce it in your firewall of choice too, which hardens the access even more.)
Grant this user as less rights as possible inside mysql.

Accessing MySQL Database from my VB.NET 2008 Project

I developed a project in VB.NET
In this project I want to use data from MySQL that is resides in my WEB Server.
I can communicate with the MySQL server of my localhost but can not communicate with the WEB Server.
In my CPanel I added Host from the Remote Database Access
But I can't communicate with WEB MySQL Server.
Please help me.
The first step is to try to connect to the web mysql with MySql Query Browser - that will tell you if the database is open for remote connections ( I assume it would fail)
I guess you have already checked it, but make sure you use the correct ip
EDIT:
As Björn said, your vb code is ok, so the problem is with the connection to the db.
Unfortunately that would be caused by many many reasons.
Are you sure you use a real IP from the host (and use it in the mysql settings)?
Are you sure you entered the correct remote host in the mysql settigns?
Are you sure you have correct connection string in the vb code?
Since your post indicates you can access the DB on your localhost, it doesn't seem to be an issue with the way you're connecting to the DB from your application (.NET-Connector?).
What does the external MySQL-Server say? Access denied? Or can't you reach it from the pc where your application is hosted (aka maybe a firewall regulation, other network etc.)?