My Java application uses MariaDB (MySQL) Database. The difficulty at the moment is deployment using a simple package so that these can be installed on another server with ease (The server is most likely disconnected from the outer world so no downloading scripts will work). Is there anyway this can be done? Perhaps, scripting or packaging? Does anyone have experience in doing such task? I am certain that this is a common situation for intranet server applications. How are they usually done?
I have done my research, and I know there are alternative database such as Derby which can be embedded. This is surely an option, but I would like to stick with MySQL if possible. Also, it's an open-source project so no need for legal advice. I'm trying to tackle the problem not run around it --at least for now.
* Assume server is Offline
* Assume no root privileges on the server
* Easy to set up & configure (possibly no install procedure)
* Automate the process
So, for someone out there who would be looking for a way to do this.
I will answer my own question.
As suggested below, you can consider taking advantage of platforms like Docker, but it requires you to install Docker on the server. Also, I am not too sure if linux container can perform just as an application physically installed on the server would. It probably depends on the application. Since it is fairly new, you would also have to fiddle with it a lot to get used to it.
Another solution is to download binary tar and follow install guides that does not require root access (This is where I started for Linux x86_64 server: http://www.bluecrownsoftware.com/article/271/Installing-MySQL-without-Root-Access-on-Linux). Then you can zip up the entire directory. Minor settings after migration can be done with scripts. However, this requires that you have deployments ready for all kinds of OS. Beware...I had to face countless errors due to poorly written scripts. They basically wrote the scripts assuming your environment is not local. Maybe I can help you if you are having troubles. I got it to work for this OS at least.
You can look for portable versions such as (https://code.google.com/p/pts-mini-gpl/wiki/Portable_MariaDB) but it is unlikely that these exists for every OS.
I will probably stick with option 2 for my project since I have only couple of OS to worry about for my project now. GL everybody. Case closed.
Have you explored the option of running mysql/mariadb in a container.