简体   繁体   English

如何连接到共享的 mysql 数据库来为 bi 供电

[英]how to connect to a shared mysql database to power bi

I have a database in phpmyadmin, which is not hosted in my local machine.我在 phpmyadmin 中有一个数据库,该数据库未托管在我的本地计算机中。 I just have the username and password to enter in the database.我只有在数据库中输入的用户名和密码。 link and info is below:链接和信息如下: 在此处输入图像描述

I want to connect the "outreachbin" database to power bi.我想将“outreachbin”数据库连接到 power bi。 for that i did the following steps:为此,我做了以下步骤:

1.Get Data > Database > MySQL Database
2.server:127.0.0.1:3306(also tried localhost:3306)
Database: outreachbin
3.Database:
username:phpmyadmin
password: *******

got error: "MySQL: Unable to connect to any of the specified MySQL hosts."出现错误:“MySQL:无法连接到任何指定的 MySQL 主机。” Also installed mysql connector but always getting this error.还安装了 mysql 连接器,但总是出现此错误。 How can i solve this problem?我怎么解决这个问题? Thanks谢谢

It appears from the screenshot you posted that phpMyAdmin is hosted on server IP 54.90.3.4.从您发布的屏幕截图中可以看出,phpMyAdmin 托管在服务器 IP 54.90.3.4 上。 Assuming the database is hosted on the same server you may want to try setting your server value to:假设数据库托管在同一台服务器上,您可能想尝试将服务器值设置为:

server:54.90.3.40:3306服务器:54.90.3.40:3306

The port 3306 assumes that the database server is running on the default port.端口 3306 假定数据库服务器在默认端口上运行。

So, if it is the first time you are connecting to it, then you can see an icon at the home page called as MySQL.因此,如果您是第一次连接它,那么您可以在主页上看到一个名为 MySQL 的图标。 Then click on it and it will ask details.然后点击它,它会询问详细信息。 It will ask the server name, enter the name and database if required.它将询问服务器名称,如果需要,输入名称和数据库。 Then it verifies and asks the username and password to login.然后它验证并要求用户名和密码登录。 the server Ip in your image is IP 54.90.3.4 this is your hosted server.您图像中的服务器 Ip 是 IP 54.90.3.4 这是您的托管服务器。 If your database is hosted on same server, you should set your same server value.如果您的数据库托管在同一台服务器上,您应该设置相同的服务器值。 Add the default localhost in the last.在最后添加默认本地主机。 follow here to connect to powerBI按照此处连接到 powerBI

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM