I want create Mysql data base in asp.net (c#) as Dynamically.My task is when user login then automatically create Mysql database with username and save into my serverpath(App_Data). Actually i am not femiliar with mysql database.. please help me how to create this.....
Asked
Active
Viewed 1,469 times
0
-
1Why do you require seperate databases for all users, and all of these to be on your server? Seems unneccessary? – Oxonhammer Jul 15 '11 at 07:13
-
You should definitely Read This - http://stackoverflow.com/questions/327787/is-it-unreasonable-to-assign-a-mysql-database-to-each-user-on-my-site – V4Vendetta Jul 15 '11 at 07:21
-
@Oxonhammer I interpreted the question differently: in my understanding the requirement is not to create a DB for each user, but to replicate with MySql what Visual Studio does with SQL Express (i.e. it creates automatically ASPNETDB.MDF in App_Data and you can deploy the membership data with your application). But maybe you're right, so I'll wait for @Victor to clarify. – Paolo Falabella Jul 15 '11 at 07:28
-
hi,actually i have create SQLCE database in my application but now i want create Mysql database insted of SQLCE. – Victor Jul 15 '11 at 08:58
1 Answers
0
If your purpose is being able to deploy the DB with the application just by copying it on the server (as you're implying with the reference to app_data) then MySQL is not the right database choice. You can't deploy a MySQL database just by copying the underlying files. You probably want an in-process engine, like Sqlite, Sql Server Compact Edition or even MS Access.
If your request, however, is to use MySQL as a db for users and roles (but you understand that you will need to setup MySql and create the DB on the server before using it, as it will not be copied with your web application), then you can take a look at this question: ASP.NET Membership/Role providers for MySQL?

Community
- 1
- 1

Paolo Falabella
- 24,914
- 3
- 72
- 86