Search code examples
c#mysqlembedded-database

Embedding MySQL Database into application in C#


I am currently looking into developing an application in C#. The application will need to use a database backend but I was wondering if it possible to embed a database into the application itself. I.e. the user would not need to install MSSQL or MySQL onto the computers separately to my own app but instead install my program and the database is installed with it. If possible I would like to use something like a MySQL Database but not needing the user to install the MySQL Server. Is there a free option to resolve this problem.

Thanks for your help


Solution

  • Look at System.Data.SQLite which can be embedded into your program.

    System.Data.SQLite is the original SQLite database engine and a complete ADO.NET 2.0/3.5 provider all rolled into a single mixed mode assembly. It is a complete drop-in replacement for the original sqlite3.dll (you can even rename it to sqlite3.dll if you're using it natively).