using windows authentication with MySQL

regwood79

Member
Joined
Jul 20, 2005
Messages
13
Programming Experience
3-5
Hey guys:
I am developing a database application that will be used in the making of reports. The problem I have is my boss wants when the people use the application that they just click on the app and it automatically logs them into the database using their windows AD login credientials. Is there a way to do this with MySQL. I am going to use Asp.net for the development script. to clarify I want to be able to when the program launches it grabs their current login information from xp or Active Directory and uses that information to log into the MySQL database. Thanks for any help
 
Windows and MySql are not connected, you know. No database server is as far as I know. What you can do is to create the users in your domain as users in the DB. If this app is the only way they use DB server then you can do a trick, create a common "admin" password for all users (not known to the individual user). Utilize the knowledge that once the user has logged into the domain the user is authenticated. When running your application to connect use the little code above to get the current user and just input/hardcode the common "admin" password. Now you got your MySql 'hooked' to the Windows authentication system, with automatic login and all for every user.
 
JohnH said:
Windows and MySql are not connected, you know. No database server is as far as I know. What you can do is to create the users in your domain as users in the DB. If this app is the only way they use DB server then you can do a trick, create a common "admin" password for all users (not known to the individual user). Utilize the knowledge that once the user has logged into the domain the user is authenticated. When running your application to connect use the little code above to get the current user and just input/hardcode the common "admin" password. Now you got your MySql 'hooked' to the Windows authentication system, with automatic login and all for every user.

Ummm how about SQL Server? As far as I know, it's the only one that allows for Windows Authentication use.

-tg
 
good luck, remember to check with the WindowsIdentity.IsAuthenticated Property
 
Back
Top