how to bundle MySql database along with the exe file in a desktop application.

I have created a desktop application that uses MySQL database (local access). I am able to build the code and was successful in running the desktop application in my own computer.

But when i copied the exe folder and tried to execute in another system, it says no database found.

I understand that the database is not bundled along with the exe file generated with the build command.

Being new to Xojo, Kindly let me know how to incorporate the database along with the exe file so that i can run the application in any computer.

Thanks in advance.

Is this going to be a single user application? Why not simply use SQLite?

@Bob Keeney . Thanks for your reply.

My database have huge amount of data and can extent to a wider application in future.

Based on few reviews earlier, i came to know SQLite is more suitable for small applications.

hence i prefered MySQL. Is it possible to bundle the database with exe.? Does it require and extra scripting?
If so, Can you suggest me where can i find the solution for this?.

@Bob Keeney
Is this a licencing issue or something that can be dealt with scripting?

Tthat is not about xojo. MySQL is an external application. You have to install it on the other pc, and then recreate the schema using SQL.

@Ivan Tellez Thanks for replying.
But i am developing the software for a client who will commercialize it and multiple users may install it.
In such case now can i handle it?

Generally what you end up doing is making MySQL a requirement for using the application. The end user is responsible for setting MySQL up and creating the database with an initial script that you provide. They will also have to setup user security which may, or may not, give your application the ability to modify the schema.

Then you application will have a SETUP screen that lets them connect to the server and particular database. When it comes to servers your app is a guest and you will have to play by their rules. So you’ll have to be accommodating on database name, user name and password, check for proper schema, etc.

I’m sure there are examples in the real world, but I don’t know of any apps that create their own MySQL instance and claim sole usage of it. It’s generally not how db applications work.

You might want to look at CubeSQL as it’s a lightweight SQLite database server. I think you can included it in your bundle and start/stop it manually. Never used it that way but it’s something to look at.

FWIW, I’ve had several gigabytes SQLite databases with no issues.

what is a “huge amount of data” ?
I have a sqlite database with 600k+ records in one of its 30+ tables and it performs completely fine.
not sure if mysql is a better choice for a local database.
also the licencing scheme of mysql is quite obscure: they can ask you money at any time if they want it…

Not true. SQLite will handle databases which have millions of rows and are gigabytes in size.

Suggest you look at http://www.sqlite.org for more information.

[quote=421862:@Tim Streater]Not true. SQLite will handle databases which have millions of rows and are gigabytes in size.

Suggest you look at http://www.sqlite.org for more information.[/quote]

There is a huge difference beetween “It works” and “it is the best option”

It is better to look a this: Appropriate Uses For SQLite

still have some time to be there…

You may better write your app to use SQLite by default and offer users to use CubeSQL, MySQL or PostgreSQL for server mode.
If your SQL is just SQL-92, this should be easy to code in Xojo.

And you avoid the risk that for a MySQL only app someday Oracle comes to get a license fee for commercially bundling MySQL!

@Jean-Yves Pochez @Christian Schmitz @Ivan Tellez @Tim Streater @Bob Keeney
Thanks all for your response. I will take your words, and go accordingly.