Running ADempiere on MySQL
ADempiere on MySQL
The purpose of this blog entry is to
- Present a business case for running ADempiere on MySQL
- Show how to run ADempiere on MySQL and Glassfish
- Inform the ADempiere community that ADempiere on MySQL is soon going to be a possible deployment option
Why MySQL?
Implementing and deploying a new stack or component in it is a costly proposition. A new component increases the costs and complexity of the existing architecture non-linearly. Extra costs must be borne in software licenses, hardware purchases, maintenance, training and wages. Quite unsurprisingly companies want to spread fixed costs of servers and wages across various products. (For those who are wondering whether these really are fixed costs, welcome to SMB sector!) These companies therefore look for solutions that fit in their existing stack.
MySQL, the internet db, needs no introduction. A large number of companies have MySQL deployments. When these companies start looking for an Open Source ERP application, they obviously would want to go with an ERP that has the backing of a strong community and is based on the same stack as they are currently using. Whereas Adempiere definitely meets the first criterion, the second one may not always hold true. This blog aims at introducing one more option while deploying Adempiere .
Adempiere on MySQL - a first look
Once you get Adempiere to run on MySQL, there is no way to tell any difference between Adempiere running on MySQL and Adempiere running on one of the other supported database. Here is how the installation screens look like -
Installation Screen -
This is how the Adempiere screens look like - of course the user does not get to see any changes at the application level. It's only on the Adempiere Connection window that the MySQL connection needs to be mentioned.
Steps for Running Adempiere on MySQL
For running Adempiere on MySQL and Glassfish, you need to
- Install and prepare MySQL
- Check out the mysql branch source code of Adempiere. You need to build this source code to get a MySQL ready installation file.
If you are using Netbeans, the good news is that ADempiere is now a Netbeans project. This means that you can check out the code and just press the build button to get the installer file.
Note - the code is not yet checked in. As soon as the code becomes ready, I'll update this entry with the repository location. - Install Glassfish. If you are running OpenSolaris, you may want to glance over this document.
Preparing the DB
- Obtain MySQL community version from here.
- Install MySQL, preferably as a service or as daemon. Do remember the root password, it will be used time and again. In case you mess up with the password, the clean up act is quite easy. Refer this link.
- Start MySQL in a way appropriate for your OS.
- Create a database called adempiere
mysql> create database adempiere;
- Create a user adempiere with password adempiere
mysql> create USER 'adempiere'@'localhost'; mysql> GRANT ALL PRIVILEGES ON *.* to 'adempiere'@'localhost'; mysql> update user set password=PASSWORD("adempiere") where User='adempiere'; - Verify that the user is created and has the appropriate priviliges.
mysql> select User, Host, Password from mysql.user; The output looks something like -
The key point to note here is that for MySQL 'adempiere'@'localhost' is different from 'adempiere'@'*'adempiere | localhost | *B3829BD27D70B4AE67C3B665A2CA5DE36F37DB6F
- Import the Adempiere mysql dump. This dump location is not finalized yet, I'll update this point.
Changing ADempiere source code
Well, I am not going to talk of the numerous Java source code changes (mostly in query formation) that have to go into the source code. Instead, I am going to check-in the modified source code in branch in the main repository and let you know the location. I'll provide the repository location as soon as the code is committed. There are some formalities that are delaying the code check-in.
But the bottom line is on building the source code you will get a installer zip and tar.gz file which you can use to install MySQL enabled Adempiere.
Verifying that it works
I've tested the Adempiere on MySQL and Glassfish installation on the following platforms and got satisfactory results -
| Platform Name |
MySQL Version |
Glassfish Version |
| Opensolaris 2008.05, 2008.11 |
5.1 and 6.0 |
V2.1 |
| Windows XP, 2003 Server |
5.1 and 6.0 |
V2.1 |
| Ubuntu 8.04 64 bit |
5.1 and 6.0 | V2.1 |
| Solaris 10U6 |
5.1 |
V2ur2 |
| Solaris 10U5 on T2000 (Sparc Machine) |
5.1 |
V2ur2 |
TBD: Update the Adempiere source code link
Hi, FYI here is the discussion thread about this post on ADempiere forums:
https://sourceforge.net/forum/message.php?msg_id=7477792
Best regards,
Teo Sarca
Posted by Teo Sarca on July 03, 2009 at 06:24 PM TPT #
Hi!
I think it is a good work and a good news. I'm interresting of your work.I need that you explain me how you have procced. I'm also working for this issue, so I will very happy if you tell me your method. Were can i have your source code? is there some modifications done in the source code?
Fabrice.
Posted by Fabrice KAMENI on July 10, 2009 at 05:11 PM TPT #
This is incredible! Thanks for this post. I did notice that you're using 3.5.3a, I'm assuming this is essential since it's the first one not requiring PL/Java
Posted by Gabe on August 01, 2009 at 12:34 AM TPT #