Unable to connect Power BI with Mysql Database - mysql

I am trying to make a connection of PowerBI with Mysql database. I am not able to find the server name required for connection.
I was able to make a connection with Postgres database. I am not able to find the server name required for connecting to Mysql Database and it just says validating credentials and asks me to install some dependencies which I have already installed multiple times.
Any help would be much appreciated! Thanks in advance.

Hey there Dan Christian, to connect Power BI Desktop with
MysqlDatabase Server please follow the below steps, we have faced a
similar issue and when we followed
these steps it worked:
1.Press "Windows" key and search for "Services", in the "Services" search for "MYSQL80"(or any version that you maybe working on) and
make sure it is running otherwise right click it and "Start" the
service. [Click here][1]
2.Now , Open Mysql workbench on the authorization screen you can see the ip address where Mysql is running on.[click here][2]
3.In my case it's "localhost:3306" "3306" is default port for Mysql.[Click here][1]
4.it is configurable we can change the host and port its running on by changing them in the Mysql settings which is the small "Tool" icon.
5.After the steps 1 to 4 are done proceed with PowerBI.
6.After opening PowerBI Desktop, Goto Home.
7.Click the "Get Data" Button.[click here][1]
8.Then click "More".
9.A window pops up in which there are multiple options to select on the left.
10.Select "Database".[click here][1]
11.Search for "Mysql Database".
12.A small window with the fields "Server" and "Database" is shown.
13.In the "Server" field fill "localhost:3306" if you haven't configured it to something else in the steps 1 to 5. [click here][1]
14.For the sake of connection use the default database provided by Mysql "sakila".
15.After this a window pops with the options Database and Windows, select "Database" and fill in your credentials default username is "root" and enter your password.[click here][1]
16.Then click "connect" if the credentials are right a window with all the tables in sakila database.
17.Now you have succesfully connected to Mysql Database in PowerBI repeat the steps to use desired databases.
[1]: https://i.stack.imgur.com/c41lh.png [2]:
https://i.stack.imgur.com/BR3yH.png

Related

Unable to Connect to MySQL local server 3306 in Power BI

I was about to start a Project using MySQL and Power BI for creating a dashboard but I faced a severe challenge. When I was going to connect MySQL database in Power BI, I faced an error like:
Microsoft SQL: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An established connection was aborted by the software in your host machine.)"
I am not able to find any solution for this over the internet.
Ok, so I had the exact same error and I got that resolved. So you'll need to ensure that the MySQL connector net is installed. And I made the mistake of importing the JAR file instead.
DO NOT DO THAT. Download and Install the msi package (If you're using windows) from this link. Connector Net Download Link.
Once that's installed.
Close Power BI if it's opened. (Basically restart Power BI).
Start the SQL Server. I'm using XAMPP.
Check this screenshot of the XAMPP Window with the MySQL server started.
Open Power BI and click on "Get Data" option. That will open up a pop up window asking you to choose all the different data sources.
Now comes the 2nd important point. Ensure you select "MySQL Database". Check this image for the MySQL Data source.
Click on "connect", and in the server field type in the IP address and the port number. and also specify the database name. Check this image for the input fields.
Click "ok" and if all goes well, you should see all the tables under the database in the "Navigator" window. I have selected 2 tables called "city" and "sdetails" under the database "school".
And from here, you can choose to "Load" or "Transform Data" and get on with visualizing it.
Note :
1. If power BI throws up an error window asking for credentials choose "Database Credentials". By default "Windows Credentials" would be selected.
2. Here, provide the username and password for your SQL Connection. The same credentials which you would use in your code based connections.
3. For XAMPP the default username would be "root" and the password would be an empty field.
4. Save the database credentials and try connecting to the database again and it should work.

How to configure MySQL data source for PhpStorm?

I have a legacy PHP project using MySQL. PhpStorm discovers that there are MySQL queries inside the project, and asks me to provide a data source for them.
This opens this window:
Yet I am totally confused on how to provide the credentials to my MySQL database. I expected a mask to enter my MySQL host, username, password and target database name. Yet I cannot find this in here.
How to configure a MySQL data source in PhpStorm?
To create a new source for your projet, click on the green "+" icon and select mysql in the list of drivers. It should display fields for database info including username and password.
You have to click on the green +, top left corner.
Then Click on MySQL, and you will be able to enter DB informations.

Cannot see my database (schema) in MySQL Workbench

I recently installed mysql5.5 to my Windows 7 (x64) machine. The first problem was I couldn't enter the cmd client with mysql -u root -pmypass. The cmd opens, yields an error for like 0.5s and closes. Than I created another user account with all privileges, it worked and I created a database. But now I want to export that database from MySQL Workbench but I cannot see that in the "select a schema" option. I tried "new connection" and "new server instance" none worked.
Any suggestions?
Thanks in advance..
For the command line use WB too. In the list of connections you can right click for the context menu, which also offers to open a CLI window. In general, when you work with the CLI first open a normal CLI window (Start Menu -> Programs -> Accessories) and then try the mysql -u -p command. This way the CLI window won't close immediately and you can see what error message came out.
For WB: if you don't see a schema you know is there then probably the user you used to connect has no permissions to see it. So for tests try connecting as root and see if your schema is there. Import and Export of db objects (including entire schemas) is available in the admin section, not in the SQL IDE (where you found "Edit Table Data" etc.).

Cannot connect to MySQL Server database at localhost:3306

When I first set up MySQL Server in Netbeans everything worked well. Now one day I think I accidentally clicked something or my computer lost battery life when I was connected to MySQL Server, and after these event(s) I have not been able to connect to MySQL Server. I do not know for sure if either of the above events would have any effect on connecting to a MySQL Server database.
Anyway since these events I have found that I cannot "start" or "connect" to a MySQL Server databse. I am doing this all through Netbeans IDE.
Here is a picture of how I try to connect to my databaseL:
This is what the error message says after I click connect:
Unable to connect. Cannot establish a connection to jdbc:mysql://localhost:3306/twitterdata using com.mysql.jdbc.Driver(Unknown database 'twitterdata'). The name of the database I am trying to connect to is twitterdata
How can I get reconnected to the MySQL Server database "twitterdata"?
I am not familiar with MySQL, databases, servers and I have no idea how to get reconnected. If there is any other helpful information that I should provide let me know.
What MySQL tools can I run to find my problem?
Why would the error message tell me that the database is unknown?
If I got to C:\ProgramData\MySQL\MySQL Server 5.5\data. There is a folder named twitterdata.
Here are the contents of that directory:
Please let me know if you need more information or if you have other suggestions that would help!
Thanks for all the help!
If you are using windows system and facing the error 'unable to connect localhost 3306' at the connection time. First you have to need start MySQL services in 2 steps:
Press "Windows key + R" write "services.msc"
And run as admin start MySQL service.
There can be three issues:
1) Either your server isn't even running. Open your command prompt and enter mysql
2)Let's say it is , can you check if it's connecting on the correct port.
Like in the url, you are using 3306,
Try following this post:
How do I find out my MySQL URL, host, port and username?
3) Can you check what if there are any credentials to the database you are connecting?
https://netbeans.org/kb/docs/ide/install-and-configure-mysql-server.html

MySQL Migration Toolkit & SQL Express

I'm trying to port a database from SQL Server Express over to my MySQL database. I've made sure the SQL Express is running on port 1433 and all, and the MySQL Migration toolkit is even able to see the different databases/schemas I have in my SQL Server Express DB.
The problem is that MySql Migration toolkit won't let me press "next" until I enter a username/password, which doesn't make sense to me since it is able to connect to the Express DB and view all of the schemas without those.
I've tried using the "advanced" settings to directly specify the connection string, but that's not working for me either. I'm probably getting the string wrong. Help?
OK. In Source Database select MS SQL Server. In Advanced Settings write
jdbc:jtds:sqlserver://10.210.4.2:1433/INFRASTRUCTURE;instance=MENG;user=sa;password=XXX;charset=utf-8;domain=
Test your connection with clic button database to retrive list from server.
If no conect then:
¿Do you connected from remote machine? OK is your firewall Up? Can shutdown? No? configure and open your 1433 port or SqlServer executable.
Ah! and enable and Start SqlServer Browser service!
Uhhh fill the other text box to activate the next button.
Happy MySqling!
For any other poor soul trying to get this work, try this. Enabling TCP/IP connections for SQL express seems to do the trick.
http://www.pierrebuckley.com/2010/06/02/resolving-connection-error-with-mysql-migration-toolkit/
By default SQL Express has access for user 'sa' and empty password. Try that.
Ahah! I got it! I was able to make it work using this connection string:
jdbc:jtds:sqlserver://localhost:1433/Bookstore;user=;password=;charset=utf-8;domain=
I put that in the advanced text box, and then just a space for the username (that probably could have been anything though).
(The sa and empty password trick wouldn't work for me)