Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,844 members, 7,810,255 topics. Date: Saturday, 27 April 2024 at 02:53 AM

[RESOLVED] How do I package my database with my application? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / [RESOLVED] How do I package my database with my application? (3780 Views)

Backing Up Your Remote Mysql Database With Mysqldumper / How Can I Package My Program Wit Netbean IDE? / Help!! Pls How Do I Create A Database With Mysql (2) (3) (4)

(1) (Reply) (Go Down)

[RESOLVED] How do I package my database with my application? by danvery2k6(m): 2:56am On Nov 23, 2012
Hi guys. I've developed a simple app that has database connectivity with mysql.

I wish to distribute my app so that the user will not need to install mysql before using it.

I've tried creating a jar file but only the GUI runs correctly with that.

How do I package my database too.
Re: [RESOLVED] How do I package my database with my application? by Danyl(m): 4:33pm On Nov 23, 2012
2d best of my knowlegde,if u r using netbeans,it-ur mysql db only nids 2b in d 'dist' folder b4 u cn distribute it,bt if not,then u just zip everythn 2geda n distribute it..when users try 2create d .exe version d mysql db will just be one of the files ur applicatn nids 2work,bt its beta u have gud packaging of d code files n the db

1 Like

Re: [RESOLVED] How do I package my database with my application? by Nobody: 11:18pm On Nov 23, 2012
there should be a java WMI library, google and use that to install mysql on deployment system.
wmi has a Win32_Product class, that lets you install .msi file
so meaning you will need to copy the database installer along with your application.
you can also through the interface query whether a software is installed or not so you dont install mysql on a system that has it
and just ask the use to provide the user and pass for the database.

here is a link to a python version of the library,it basically works same way since it's a wrapper around the windows WMI.
same way the java version will be a wrapper
http://timgolden.me.uk/python/wmi/cookbook.html

hope it helps.
Re: [RESOLVED] How do I package my database with my application? by danvery2k6(m): 5:29pm On Nov 25, 2012
If I want to include the MySQL db in the application package, how do I get the db since I've been trying in vain to save a db from the MySQL querry browser. Should I include the MySQL folder from program files as someone sugested?
Re: [RESOLVED] How do I package my database with my application? by Chimanet(m): 7:18pm On Nov 25, 2012
why not try HSQLDB in the embeded mode, it has all you need to bundle your your application with your database, jst add the jar file to your classpath and you are ready to go. Av used it before, and it works perfectly well. its relatively easy to set up, Just try googling about it
Re: [RESOLVED] How do I package my database with my application? by xterra2(m): 5:19pm On Nov 26, 2012
I did a java application similar to yours a while back
by using mySQL as your db, the end user has to have mysql installed and configured because maybe you used 'root' & 'password' as your username & password respectively mysql defaults to 'root' & '' (no password) after install
So solution is DROP mySQL and use Sql lite - SQL lite is an 'embedded' database it doesnt really need the end use to have to install mysql or sql server doesnt realllly care about the database engine.
You can have the db alongside the .jar so if you run the .jar it can communicate with the sql lite db it really is just a file .db i think
Though sql lite doesnt have as many features as Mysql it would do the same job. Distributing the folder is all what you have to do

BTW, Try and use SQL lite and please let me know how it goes
Re: [RESOLVED] How do I package my database with my application? by danvery2k6(m): 10:20am On Nov 27, 2012
A million thanks to you guys for being of help. @xterra2 sql lite was just what I needed. For a simple project like the one I did, it was just perfect.

(1) (Reply)

Python Program Problem / Hi Guys! Created A Signup Form Using HTML5/CSS3. Source Code Available. / Get Complete Android Development Videos +java Videos Begin Your Journey

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 22
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.