Connect Google Data Studio to Local Mysql Server

心已入冬 提交于 2020-01-05 12:56:25

问题


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.


回答1:


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




回答2:


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.




回答3:


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.




回答4:


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



来源:https://stackoverflow.com/questions/49451169/connect-google-data-studio-to-local-mysql-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!