0

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.....

4
  • 1
    Why do you require seperate databases for all users, and all of these to be on your server? Seems unneccessary? Commented Jul 15, 2011 at 7:13
  • You should definitely Read This - stackoverflow.com/questions/327787/… Commented Jul 15, 2011 at 7: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. Commented Jul 15, 2011 at 7:28
  • hi,actually i have create SQLCE database in my application but now i want create Mysql database insted of SQLCE. Commented Jul 15, 2011 at 8:58

1 Answer 1

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?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.