Connection string to use mySQL auth_windows

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 1
Joined: Fri 08 Apr 2016 14:16

Connection string to use mySQL auth_windows

Post by bearcloudIT » Fri 08 Apr 2016 21:34

I have a dotNet 4.0 EF6 web application and am testing the possibility of porting the backend DB to mySQL. My application requires that the domain user that is used to authenticate the IIS App Pool be able to read and write to the database. I have successfully used dotConnect to make a connection to the mySQL DB using a standard connection string for a mySQL login. But as I said, I need the domain app pool user to be able to login to mysql. I have installed, enabled and tested the mySQL windows authentication plugin while logged in as the app pool user and it worked fine. So the final step is to update web.config with the correct devart connection string to use Windows authentication. I have looked everywhere but cannot find this information anywhere.

What is the connection string for windows authentication?

Devart Team
Posts: 2105
Joined: Wed 02 Nov 2011 09:44

Re: Connection string to use mySQL auth_windows

Post by Pinturiccio » Thu 14 Apr 2016 13:32

bearcloudIT wrote:What is the connection string for windows authentication?
If you have successfully installed the Windows authentication plugin and created the corresponding user as described in MySQL documentation, it should be enough to specify the name of the user in the connection string and omit the password.

For example, if you have the following user:

Code: Select all

CREATE USER sql_admin
  IDENTIFIED WITH authentication_windows
  AS 'Rafal, Tasha, Administrators, "Power Users"';
Your connection string will look like the following:

Code: Select all

Host=<HOST>;USER ID=sql_admin;database=test;port=3306
Can you connect with such a type of a connection string?

Post Reply