Is there a document I can follow that details how to change the jasper server report database instance from the default of postgres to mysql?
My purpose is to run just one database server on my jasper server. I have other MYSQL databases I need to restore to the report server and no postgres databases, therefore I might as well stick to one database server instead of running 2 on the same server.
I've been looking around but cannot find much on how to do this. I haev seen teh install guide but it's not clear.
Sorry for my poor English, I cannot understand your questions.
1. Does your first question mean data migration from PostgreSQL to MySQL ? If so, there is many data migration tools outside, for example: http://www.lightbox.ca/pg2mysql.php
2. You said your purpose to run juse one database on you JasperServer. Which one ? PostgresSQL or MySQL.
For instance, once I install JasperServer with PostgreSQL at Tomcat, there is a database called jasperserver at postgresql.
If you have just wished your reports connecting to other MySQL database, you need to add MySQL jdbc driver into the directory $TOMCAT_HOME/lib first. All resource, user and report unit data are still stored at PostgreSQL side.
JasperServer guide is clear for normal installation only.
Post Edited by icecreaming at 2012-07-15 17:05
Rather than having the jasperserver database running on POSTGRES, I would like to have the jasperserver database running on MYSQL. MYSQL was the database server for the jasperserver database in eariler versions of JasperReport server.
I have the MYSQL JDBC driver installed and working. I can connect to other MYSQL databases, no problem. However, I will be running MYSQL on the jasper server which will run a copy of various production databases for reporting purposes and I do not want to run 2 databases servers on the jasper report server, simply to make database administration easier.
So I would like to get rid of POSTGRES altogether. My question is how to do that and is there any documentation about this?
ps - your english is pretty good!
I think you have some possibilities here. Here's one way, it has a lot of steps. The first thing to do is to back up your current Postgres repository, which you will then import later to another MySQL database.
- Make sure you've shutdown your Tomcat server
- Go to the buildomatic directory and do this from the command line:
./js-export.sh --everything --output-zip postgresbackup.zip
That zip file will contain everything (organizations, users, reports, schedules, etc) that JRS needs to run. Once you have the MySQL database ready to go, you'll use another script to import it to your new database.
I'm assuming that you don't want to redeploy your JRS web application, and that all you want to do is migrate over to a different database.
- Next, in the buildomatic directory, modify the default_master.properties file
This file will contain information about what database you're using. The easiest thing to do is to copy the mysql_master.properties file in the sample_conf directory, copy it to the buildomatic directory, and rename it default_master.properties, to replace the other file. Next edit that file, and put the specific details about your MySQL database in there.
- Next, run the buildomatic scripts to create the MySQL repository
These steps are the ones that you find in the installation guide. You only need to run those steps that deal with the database, so that means all of them except the last one that actually deploys the web application
Only the commands in bold are absolutely necessary; the others load sample databases and reports. It's up to you whether you want them or not.
- Next, run the import script to populate your MySQL database
From the same buildomatic directory, do this from the command line:
./js-import.sh --input-zip postgresbackup.zip
The script now uses your modified default_master.properties file, and imports the backup file to
- Next, modify your context.xml file
Your context.xml file, which is under [TOMCAT_HOME]/webapps/jasperserver/META-INF, will contain JNDI entries that point to the old Postgres database. You'll need to modify the entries there with the right JDBC URL's, and the right username/password.
Also, make sure to delete the [TOMCAT_HOME]/conf/Catalina/localhost/jasperserver.xml file (if it's there), because Tomcat will check for the existence of this file before reading in the context.xml file you just modified.
- Start up your Tomcat server
- Log in (Hopefully this works)
- Modify JDBC datasources where necessary
If you used the Postgres database as a datasource as well as a repository, you'll need to modify JDBC datasources and modify them so that they point to your MySQL databases.
As you can see, it's a lot of manual steps, with potential room for mistakes