Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Portable MySql Databases

Status
Not open for further replies.

sen5241b

IS-IT--Management
Sep 27, 2007
199
US
I built a Linux based app with a MySql database and I want people to install it by just taking the app folder with the database in it and have the app be able to access the DB. Currently, to install my app the user has to create a database and load the data which is a pain in the neck.

Have guidance or know a good article on how to do this?
 
It might work.
Would it not be better to have your app create the database and the tables and then seed the data? A bit like wordpress does? You'd have to create an installation routine but that should not be too troublesome.

The all round better alternative for portable apps is sqlite. That is what it was designed for. The SQL is very similar to that of Mysql and assuming you are using pdo (which I recommend if only for its native SQL injection protection) then no other changes are necessary and you can distribute the db file Pre-seeded with data.
 
There is something like Embedded MySQL, but there is no way to embed the server process in a PHP page as far as I know. As jpadie suggested, SQLite is fit for these purposes.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top