Power BI not connecting to MySQL - mysql

I am trying to connect Power Bi (Desktop version) with my online amazon mysql database. It demands for following information once you try to establish connection
Server: server ip
Database: database name
Username: mysql username
Password: mysql password
First time I received a bit lengthy error, which was because of unavailability of mysql-connector-net-6.6.5.msi. So I followed this link to solve the issue
Microsoft Power BI connect to mysql
After installing mysql-connector I am facing another error.
Whats wrong? One of my mates has successfully connected using the same credentials that I am using.

Okay, I just figured this out for myself. I'm able to connect directly to a MySQL database on port 3306. As I understand, it would be more secure to go through an SSH tunnel, but this doesn't work yet with Power BI.
So here are instructions for connecting directly:
First, let's make sure that everything besides the PowerBI connection is working.
1) Download and install the correct version of the MySQL/Net Connector. Right now, version 6.6.5 is the one that works. But from other forums, and from within PowerBI itself, I linked to other versions that did not work. (You will know it isn't working, because you probably won't be able to even open Get Data/MySQL Database/Connect.)
2) See if you can connect remotely to your database through some well established utility like MySQL workbench. If you can't,
- look at ports on the remote server. Here's a cool utility to check ports&IPs: http://www.yougetsignal.com/tools/open-ports/
- Check the permissions of the DB user. Realize that they may be affiliated with an IP address: 'username'#'ipaddress'. So that user can only connect for a particular IP.
- Check the bind address setting. In newer versions of mariadb, it should probably be commented out. I'm not sure about older version and pure mysql.
- other troubleshooting.
So after that's working, here are the settings which worked for me in MySQL:
go to Get Data/MySQL database/connect
Server: ipaddress:3306 (include ":port#")
Database: dbname
PowerBI interface. Select "Database" instead of "Windows"
Make sure you select Database instead of Windows.
Good luck.

Just a small tip. If you haven't already, restart the machine you just installed the connector on. I had to restart before it started working.

My solution for this was to add the port number to the server name/ip
eg. 192.168.0.1:4664

Related

Connecting MySQL on EC2 to Tableau

I used a quick start guide to create a mysql database on EC2 that I can access and query using RStudio. However, I'd like to use Tableau Desktop to visualize the data as well. Tableau can connect to MySQL, but Im not sure how to make it work with EC2. I think I need to use port forwarding. I've Googled extensively and found a few examples but I'm completely new to this and don't know where to begin.
I'm using Terminal on Mac OSX. I'm able to login to SSH and to MySQL once in SSH.
Tableau needs a server, port, user, pass, and initial SQL statement. I'm assuming the initial SQL statement is just "use MyDatabase;"
I remember running into this issue awhile ago and found the solution again. I think the main thing to remember is that you have to use the localhost as the address in Tableau after you ssh into EC2 instead of the address of the actual EC2. You also have to setup your ssh to forward the port as you mentioned. Here is how you do that with PuTTY.
In the first screenshot you will see I added 127.0.0.1:3306 as the destination. This is the address of MySQL as setup on your server. I included 9990 as the source port. This is the port that PuTTY will be monitoring for any given calls. Once you have these defined click add and then save your session and connect with your server credentials through PuTTY. Go to Tableau.
In the second screenshot you will see that I used 127.0.0.1 for the server and 9990 for the port that I defined in PuTTY. You then add the credentials in Tableau that correspond to your MySQL user that is setup on EC2.

Outsystems: configuring a connection to access a MySQL database

I'm using Outsystems Service Studio to develop a web application. I need to configure a connection to access a local server database. I get "Connection String test failed: Unable to connect to any of the specified MySQL hosts." I just figured out I can't connect using "localhost", because the Outsystems server is not local, but I'm not able to find a solution. what is wrong? Other details:
MySQL Server is up and running
I selected MySQL in DBMS
Inserted my schema name
Inserted the username (with all privileges granted)
Inserted the user password
Tried both basic and advanced configuration. I inserted j"dbc:mysql://127.0.0.1:3306/mydb?user=outsystems2" as connection string parameters and I get "Connection String test failed: Keyword not supported.Parameter name: mysql://127.0.0.1:3306/mydb?user". I know this connection string can't work , but I'm not able to find a functioning one. I've read many guides about this configuration, but no solution was found. Thank you all for your time and help, feel free to ask for more details
Luciano,
Is your OutSystems environment on-premises or in the cloud? Either way, you need to make sure that this server is able to reach - it as connectivity - to your MySQL database server. Using localhost or 127.0.0.1 is pretty much the same thing as this is an address for the machine where the request is running, which is, in this case, the OutSystems server. Do you have the MySQL database on your local machine? This is not a good approach as you will need to have an address that won't change otherwise the connection won't be stable and you'd have to reconfigure it all the time.
Regards

Plesk not creating a New Database Server

I have a windows server where Plesk is installed with php & mySQL by default (from Hosting Provider). When I first got the server I remember I removed mySQL from Control Panel since I didn't need it, but after like one year, I came to a point where I have to create a Wordpress website, and therefore I am needing mySQL again.
Note also that there's two mySQL, one for Plesk (which I didn't uninstall), and another one for our databases (which I uninstalled long ago, but reinstalled later).
I went to Plesk under Database Servers, and I can see there's no Database Servers there... Then I try to Add Database Server with the following settings:
Hostname: localhost
Port: 3306
With Admin Username & Password...
But I am getting the following error:
Error: A database server with this combination of host address and port number is already registered.
Please note that this is surely different from the mySQL settings for Plesk since the port is different.
Do you guys have any idea how to resolve this issue? I've been stuck since a few days...
I appreciate your help guys that's urgent!
Thanks.
Looks like inconsistency in plesk database "psa" related to entity of database servers.
Most easy workaround it's to register new database server not as "localhost", but as "127.0.0.1" or some other name which can be resolved to localhost or other port.
Another workaround it's to look into psa database via "%plesk_bin%\dbclient.exe" --direct-sql --sql="select * from databaseservers".

MySQL Workbench: "Can't connect to MySQL server on 127.0.0.1' (10061)" error

I apologise.. I know this question has been asked many times before, but I've tried lots of suggestions, and simply can't find a solution.
The problem: I have a MySQL database running on a hosted server.
I have to use SSH to connect to it, and I have the relevant Public and Private Key files.
I specifically want to use the PC version of MySQL Workbench, to access this database, for running queries, checking data, etc.
If I run Sequel Pro on a Mac, it connects fine, and I can browse and query the database. No problems.
If I run the trial version of SQLyog on a PC, it also connects fine. No problems.
But if I try to connect use MySQL's own "MySQL Workbench" application, using exactly the same settings and SSH Private Key file, it refuses to connect, throwing the well-known error:
Can't connect to MySQL server on 127.0.0.1' (10061)
I find it frustrating, as, in SQL Workbench, I specified the "MySQL Hostname" to use, db01.mysql.vm.MyHostingServer.net, but Workbench seems to ignore it, and demand to connect to 127.0.0.1 instead.
(I have read that Workbench says it needs the Public key file, but actually means the Private key file... and I have tried with both. I've also tried with MySQL Workbench on a Mac, but that crashed all over the place, simply when I was typing in server names and passwords.. it was a mess !!)
The hosting service I've gone with gives me limited permissions for changing MySQL settings, and given that Sequel Pro and SQLyog can connect successfully, I don't want to start messing about and changing things randomly.
Any ideas...?
Maybe you are not allowed to start the service "MySQL 55". Set the login information of Service "MySQL 55" as local!
To see the list of aviable services in Windows 7:
Open a run box
Type services.msc and press return.
Find the service MySQL55
A right click of the MySQL55 Local Service shows Properties -> Log On
Even I had same problem, The reason was mysql service was not getting configured properly, when I installed it through 'MySQL installer'. Also it was not starting, when I tried to start the service manually.
So in my case it seemed be a Bug with the 'MySQL Installer', as editing the install path to a different one when the 'Developer default' was selected, the problem occurs.
Solution (Not exactly a solution):
Uninstalled the MySQL all products (completely)
Reinstalled, this time also I have selected 'Developer default', but didn't make any changes to the path or any thing. So the path was just 'C:\Program Files\MySQL' (the default one)
And just clicked Next Next...
Done, this time MySql was running fine.
After making above improvement such as checking if mysql service is running or not, you just need to give a small password while creating connection, it is ' ' or 1 time press on space-bar in case of GUI or workbench. After which you just need to validate your machine with server (validated HOST). For that purpose click on 'New Server Instance' and it will configure server/HOST on your behalf itself.
I have done this successfully just a few couple of minutes ago. My workbench software is able to show all pre-installed databases etc now.
hope it will work for you as well.
Thanks!!!
I was having same issue, way i have resolved is:
opened the MySQL installer. i was having a Reconfigure link on MYSQL Server row.
Clicked on it, it does reinstalled MySQL Server.
after that opened MySQL Workbench, and it was working fine.
Try placing the host name (db01.mysql.vm.MyHostingServer.net) in your windows host (C:\windows\system32\drivers\etc\host) file along with it's IP address and port number and see if that helps.
If you have installed WAMP on your machine, please make sure that it is running. Do not EXIT the WAMP from tray menu since it will stop the MySQL Server.
To connect to a new server, you click on home + add new connection. Put IP or webserver URL in new connection.
Just try to run the following command manually:
C:\wamp\bin\mysql\mysql5.6.17\bin\mysqld.exe --console
It worked for me :)
Ran into the exact same problem as OP and found that leaving the "MySQL Server Port" empty in the MySQL Workbench connection solves the issue.
I have tried all the method.
I will suggest you to reinstall it.

Failed to connect to MySQL at 127.0.0.1 in MySQL Workbench. System error 61

I'm running into a little trouble with MySQL Workbench.
This is the situation, I'm developing a database to query it remotely from Android devices. This is the first time I use MySQL Workbench, so I've followed this tutorial:
http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/
I have no problem creating the EER diagram and generating the SQL script. The problem comes when I try to connect to a MySQL server. I get this error:
"Failed to Connect to MySQL at 127.0.0.1:3306 with user root. Lost connection to MySQL server at 'reading initial communication packet', system error: 61"
http://img101.imageshack.us/i/capturadepantalla201104i.png/ (if the link stops working tell me)
I've also tried using the Local Socket/Pipe connection method with the MAMP Socket in '/Applications/MAMP/tmp/mysql/mysql.sock', but it gives the same error. And I've also tried using MAMP port 8889 but still nothing.
So anyone knows how to fix it? And another question, can I connect from my Android device to my laptop(where the database is placed) without using MAMP? MySQL needs MAMP to serve queries? And the last thing, am I going into the right way? Or should I do it other way?
Thanks for reading.
I had the same issue, but part of your question is what fixed it for me:
Set connection = Local Socket/Pipe
Set socket path = "/Applications/MAMP/tmp/mysql/mysql.sock" (for me - I got the path from my MySQL log upon initialisation)
Running: MBP, OSX 10.8.3 (Mountain Lion), MAMP Pro
Can't really fathom any further what your issue may be, but perhaps double check your DB is properly initialised. But, perhaps this helps someone else :)
I typed: sudo /usr/local/mysql/support-files/mysql.server start
into the terminal and it started the MySQL server successfully and I was able to connect to MYSQL workbench.
You need to sure that Mysql process is running in your system. not sure in MAC but in windows it'called mysqld.exe
well take a look
http://lists.mysql.com/mysql/124371
Most commonly happens when database/server is not running. You need to check your server, or restart it. You can do so if you have mysql workbench under server administration. Check your manual for restarting or starting the server.
On osx 10.6 using mamp pro I solved this by allowing network access in the MySQL tab from the home window. Hope it saves someone the pain too
When trying to use the MySQL Workbench and connect through an SSH tunnel, you will get this error when your SSH connection does not complete successfully (e.g. improper host, password, key file, etc)
A good way to trouble shoot this is to separately test the the ssh connection from the machine you are trying to connect from and establish that you can do so successfully.
Try closing MySQL and running it as the admin. This worked for me.
After making above improvement such as checking if mysql service is running or not, you just need to give a small password while creating connection, it is ' ' or 1 time press on space-bar in case of GUI or workbench.
After which you just need to validate your machine with server (validated HOST).
For that purpose click on 'New Server Instance' and it will configure server/HOST on your behalf itself.
I have done this successfully just a few couple of minutes ago. My workbench software is able to show all pre-installed databases etc now.
Thanks!!!
I solved it! On a mac just go to spotlight search on the top right of the screen and type Mysql. Turn it on.