MySQL database is a good option for projects that need large stable databases but cannot afford the Oracle or MSSQL price tag. The provider model in Asp.Net 2.0 allows us to use MySql with plenty of Out of the Box functionality. When using Forms Authentication, you can just configure the application to use the MySQL provider, and then use the ASP.NET Web Site Administration tool to manage users and roles in your application.
Make sure you have installed the latest version of MySQL Connector/Net. This also adds an entry each to the membership and rolemanager providers in the machine.config files behind the scenes.
Open the Asp.Net Web Site Administration page, go to ‘Provider ’ tab and click on “Select a different provider for each feature (advanced)”.
Select ‘MySQLMeMbershipProvider ’ as the Membership Provider, and ‘MySQLRoleProvider ’ as the Role Provider.
- Add the connectionstring to your MySQL server under the name ‘LocalMySQLServer’.
- Goto ‘Security’ tab and manage your users and roles.