Unable to Connect to MySQL local server 3306 in Power BI - mysql

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.

Related

SQL Server 2008 Connection Error "No process is on the other end of the pipe"

Let me begin by saying, I am aware of this thread and others around the web that seek to trouble shoot this issue.
The solutions posted there do not apply to my issue. I have spent 5 hours trying to resolve this before deciding to ask the question.
The problem:
When I attempt to log into SSMS (or connect from a java application) using SQL Authentication I get this error:
A connection was successfully established with the server, but then an
error occurred during the login process. (provider: Shared Memory
Provider, error: 0 - No process is on the other end of the pipe.)
(Microsoft SQL Server, Error: 233)
Although it does work, it is not an option for me to use integreated authentication.
The database I am attempting to connect to is on the same machine as my SSMS instance. There is no network, this is a stand-alone system.
NAMED PIPES is ENABLED in my configuration, I HAVE rebooted since, TCP IP is a higher priority than named pipes in my configuration.
I have even gone as far as to uninstall SQL Server and reinstall it, to no avail.
The details of my SQL Server instance are as follows:
Microsoft SQL Server Management Studio - 10.0.2531.0
Microsoft Analysis Services Client Tools - 10.0.1600.22
Microsoft Data Access Components (MDAC) - 6.1.7601.17514
Microsoft MSXML - 3.0 5.0 6.0
Microsoft Internet Explorer - 9.0.8112.16421
Microsoft .NET Framework - 2.0.50727.5466
Operating System - 6.1.7601
Configuration details are as follows:
http://i45.tinypic.com/vxdz7c.png
http://i45.tinypic.com/vxdz7c.jpg
I connect from java using this code.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost;database=AdventureWorks;integratedSecurity=false;User=JIMBO; Password=JIMBO;";
Connection con = DriverManager.getConnection(connectionUrl);
But please remember, this error also occurs when I atttempt to log in to SSMS directly.
Thanks in advance.
-Jim
To force TCP/IP being used replace localhost with 127.0.0.1 in your connection string.
As you are using a username and password make sure SQL authentication is enabled. By default only Windows integrated is enabled on sqlserver 2008.
With SqlServer authentication keep in mind that a password policy is in place to enforce security.
Forcing the TCP/IP connection (by providing 127.0.0.1 instead of localhost or .) can reveal the real reason for the error. In my case, the database name specified in connection string was incorrect.
So, here is the checklist so far:
Make sure Named Pipe is enabled in configuration manager (don't forget to restart the server).
Make sure SQL Server Authentication (or Mixed Mode) is enabled.
Make sure your user name and password are correct.
Make sure the database you are connecting to exists.
My resolution was to login using the Windows Login then go to security>Logins locate the troubled ID And retype the used password. The restart the services...
Adding "user instance=False" to connection string solved the problem for me.
<connectionStrings>
<add name="NorthwindEntities" connectionString="metadata=res://*/Models.Northwind.csdl|res://*/Models.Northwind.ssdl|res://*/Models.Northwind.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS2008R2;attachdbfilename=|DataDirectory|\Northwind.mdf;integrated security=True;user instance=False;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
This problem was caused for me by this error which appeared just prior in the application error log.
"A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated."
I was storing PDFs in a SQL table and when attempting to SELECT from that table it spit out that error, which resulted in the error mentioned in your question.
The solution was to delete the columns that had large amounts of text, in my case Base64 encoded files.
perhaps this comes too late, but still it could be nice to "document it" for others out there.
I received the same error after experimenting and testing with Remote Desktop Services on a MS Server 2012 with MS SQL Server 2012.
During the Remote Desktop Services install one is asked to create a (local) certificate, and so I did. After finishing the test/experiments I removed the Remote Desktop Services. That's when this error appeared (I cannot say whether the error occured during the test with RDS, I don't remember if I used/tried the SQL Connection during the RDS test).
I am not sure how to solve this since the default certificate does not work for me, but the "RDS" certificate does.
BTW, the certificates are found in App: "SQL Server Configuration Manager" -> "SQL Server Network Configuration" -> Right click: "Protocols for " -> Select "Properties" -> Tab "Certificate"
My default SQL Certificate is named: ConfigMgr SQL Server Identification Certificate, has expiration date: 2114-06-09.
Hope this can give a hint to others.
/Kim
For me it was because only Windows Authentication was enabled. To change security authentication mode. In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties. On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
Change Server Authentication Mode - MSDN - Microsoft
https://msdn.microsoft.com/en-AU/library/ms188670.aspx
This Might help as reference
I had the same issue, after multiple trial of suggested solution on this site and others, I found a solution for my scenario. The account was locked out
How to Check if the account is Locked out...
Login to the server using higher privileged account (like SA or admin rights)
Expand security ==> select the login name ==>open the property window of the login ==> select the status page on the property window
Make sure This 3 Things
1, permission to connect database is GRANTED
2, Login is ENABLED
3, Status
SQL server authentication
Login is not locked out (Uncheck the box)
Thanks
Tsige
I just executed connection.close() by adding it as first statement and it was solved. Then i removed the line.
One follow up to this. I had installed SQL Server 2014 with only Windows Authentication. After enabling Mixed Mode, I couldn't log in with a SQL user and got the same error message as the original poster. I verified that named pipes were enabled but still couldn't log in after several restarts. Using 127.0.0.1 instead of the hostname allowed me to log in, but interestingly, required a password reset prompt on first login:
Once I reset the password the account worked. What's odd, is I specifically disabled password policy and expiration.
Another cause is if the user's default database is unavailable.
I had an account that was used for backing up two databases. When the backup user's default database was taken off-line, the "no process on the other end of the pipe" error started.
Came here looking for a solution to a similar issue, which I just introduced by changing Schannel settings of our IIS server using "IIS Crypto" by Nartac... By disabling the SHA-1 hash, the local SQL Server was not able to be reached anymore, even though I didn't use an encrypted connection (not useful for an ASP.Net site accessing a local SQL Express instance using shared memory).
Thanks Count Zero for pointing me in the right direction :-)
So, lesson learned: do not disable SHA-1 on your IIS server if you have a local SQL Server instance.
For me the issue seems to have been caused by power failure. Restarting the server computer solved it.

ASP can't connect to SQL Server database

I'm trying to get a classic ASP application to connect to a local SQL Server 2008 database. The app and database were built by someone else. I'm just trying to get them installed and running on my machine (Windows 7).
I'm getting the following error when when the ASP app tries to connect to the database:
Could not connect to database:
Error Number: -2147467259
Error Message: [ConnectionOpen (Connect()).] does not exist or access denied.
I don't see any messages in the Windows Event Viewer. I'm looking at: Event Viewer->Windows Logs->Application.
It's a fresh database install using a simple restore. The SQL Server install uses the default instance. SQL Server and Windows authentication are both allowed. I left the existing connection string (in the ASP code) in tact and just tried adding that to my SQL Server installation. Here's the connection string:
strConn = "PROVIDER=SQLOLEDB;SERVER=localhost;UID=TheUser;PWD=ThePassword;DATABASE=TheDatabase;"
To add that user to SQL Server, I went to Security/Logins in SSMS and added the user and the password. I selected the database in question as the Default database. I thought that might do the trick, but it didn't. Then, I went into TheDatabase, then went into Security there. I added a new user there, referencing the new user I had already added in server Security. Under Owned Schemas, I clicked db_owner and under Role Members I checked db_accessadmin and db_owner. None of this gave the ASP application access to the database. The sid values match in sys.database_principals and sys.server_principals for the login in question. I am able to login to SSMS using this login.
The app needs to execute selects against the database like this:
oConn.Execute('select * from someTable')
I'm not a DBA and am sort of grasping at straws here. How do I get this thing connected?
Thanks,
Jay
It occurred to me that SQL Server or the website in IIS might be running as users with the wrong permissions. Based on what I read, it's okay for SQL Server to be running as Local System, so I left that alone.
In IIS, my website was using "Application user (pass-through authentication)". This is set in the Basic Settings->Connect As ("Edit Site" dialog box). When I clicked "Test Settings...", next to Authorization it said "Cannot verify access to path (c:\mywebsitepath)." I increased access permissions on that directory, but that didn't help. In the "Connect As" dialog box, I then changed "Path credentials" to use "Specific user" instead of "Application user (pass-through authentication)". I set it to use the user that I log in to my machine as. After that, when I click the "Test Settings..." button, next to "Authorization" it says "Path is accessible (c:\mywebsitepath)." After that, the ASP website is able to connect to SQL Server just fine.
Since the connection string was using a specific SQL Server username and password, I'm not exactly sure why this fixed the problem, but it seems to have.

Cannot to connect to SQL server 2008?

I have been trying all kinds of tricks - from enabling TCP/IP, adding exception to firewalls to poking bill gates vodoo doll. But nothing seems to work for me. Is it really that difficult to connect to sql server 2008 via management studio ? Maybe, robbing a bank would be easier.
While i figure out which bank to rob, can you help me to fix the problem ?
When I try to login to sql server 2008, this is the error i get-
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
The links i tried so far -
blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/
and some more random links on the net.
When you installed SQLServer, there are several options that may affect the way SQLServer runs and how you have to connect to it. The link you included in your question that points to the sqlauthority blog has an additional thread posted by Vince. Be sure to follow those instructions so that SQLServer will be set to listen on port 1433 and not a dynamic port.
Also, when you log-in, if it tells you that the login fails (e.g., for xxx\yyy), then you probably missed the option in the install to add the current user as an authorized users. In that case, you will have to log in through SSMS using SQL Server Authentication, and provide sa as the username and the password that you set during the install.
After you log in, you can add your Windows user account to the list of authorized users by expanding the root Security folder in the SSMS object explorer, right-click Logins and select New Login. From there you can search for your user account and add a Windows authentication user. That will make it possible for you to log in using Windows Authentication so you won't have to type your password every time you launch SSMS.

SQL mangement user error

When i am creating users in SQL management studio i create them under the server name and then i create them under the database but when i try to log on using the user name and password i cant. getting erro saying
> TITLE: Connect to Server
Cannot connect to LAPTOP-RED\SQLEXPRESS.
ADDITIONAL INFORMATION:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476
BUTTONS:
OK
And the suggested solution from the help link is:
User Action
Use the SQL Server Surface Area Configuration tool to allow SQL Server
to accept remote connections. For more information about the SQL
Server Surface Area Configuration Tool, see Surface Area Configuration
for Services and Connections.
Which is what you have to do. By default the SQL Express Server isn't configured to allow remote connections.
hi I faced same issue in MicroSoft sql server 2008.
this error occurs while user limit exceeded, as you have set max connection to 1 and if someone is already logged in (or using any webpage which access your server) then it will not allow anyone to access directly or indirectly. to solve this issue simply follow following steps:
stop all web services.
open services.msc using RUN and ****restart sql server** and do not start any service which uses your sql server, so that you will be able to log in using sql server management studio.
now open sql server management studio and click on New Query button.
It will ask for user name and password use your login name and password.
run these scripts one by one sp_configure 'user connections', 0
go
6.reconfigure with override
after this restart your sql server it will show a confirmation message click on OK.
Bingo
It works. please don't forgot to vote ;-)

how to resolve the error 233 in sql sever 2005 in windows 7

I m creating a new login using sql server authentication.
a new login is created.
when i m tring to login with sql server authentication there is an error
Cannot connect to (SERVER NAME) i.e name\sqlexpress
Additional Information:
"A connection was successfully established with the server, but then an error
occurred during the login process. (provider: Shared Memory Provider,
error: 0 - No process is on the other end of the pipe.) (Microsoft SQL
Server, Error: 223)"
I hv already enabled all the protocols running as administrater. set authentication mode both windows and sql sever authentication
There are a number of reasons this error message appears. Try each of the following to see if it solves the problem:
Restart the SQL Service - sometimes configuration changes require a restart to take effect.
Check that Named Pipes and TCP/IP protocls are enabled from the SQL Server Configuration Manager
Use Surface Area Configuration Manager to ensure that remote connections are allowed if trying to connect from a remote machine.
Ensure your firewall (on the client and the server) is not blocking connections
Ensure the account has a default database defined.
Ensure the account is not disabled - if you have set up the account to enforce password policies then too many failed logins may disabled the account.
Double check that you are using the correct password - even to the extent of reseting it.
Here is the solution of this error which solve this issue i would like to answer here because if anybody find this question than it will also finds its answer and its time not wasted.
Click on Start menu > Programs > Microsoft Sql Server > Configuration Tools
Select Sql Server Surface Area Configuration.
Now click on Surface Area configuration for services and connections
On the left pane of pop up window click on Remote Connections and Select Local and Remote connections radio button.
Select Using both TCP/IP and named pipes radio button.
click on apply and ok.