Avatar of Shaun Wingrin
Shaun Wingrin
Flag for South Africa asked on

sync data between MySQL and Postgresql

Say,
We wish to use JasperReportsServer 5, which seems to support postgresql as default.
Our data is in MySql 5 on Linux server.
Is there a simple way to sync the data between the 2?
PostgreSQLMySQL Server

Avatar of undefined
Last Comment
johanntagle

8/22/2022 - Mon
johanntagle

I think you should just configure Jasper to use mysql datasource.  That will be a way lot easier.  Go to section 4.1 of http://community.jaspersoft.com/documentation/jasperreports-server-administration-guide-v500
Shaun Wingrin

ASKER
Ok. How can I get the sample data from postgresql to MySql
johanntagle

I don't believe you need to.  Jasper supports multiple data sources so you just add a mysql data source.  You will need to download the mysql jdbc driver from http://dev.mysql.com/downloads/connector/j/ and extract the jar file to the apache-tomcat/lib directory, restart tomcat (I just used the ctlscript.sh script to restart everything.)

In the data source definition you set Driver to com.mysql.jdbc.Driver and URL to something like jdbc:mysql://localhost:3306/test

That's as far as I've gone so far =)
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Shaun Wingrin

ASKER
Tx. Its the sample data that was an issue for us...
johanntagle

Again you can keep the postgresql data source with the sample data, then just add a mysql data source for your real data.  No need to transfer data from postgresql to mysql or vice-versa
Shaun Wingrin

ASKER
I've also my own data that wish to transfer - how can I import data to Postgre?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
johanntagle

Think you should file that as a separate question and provide details what exactly you want to do i.e. what is the format of the data, etc
Shaun Wingrin

ASKER
Can one have links to 2x data sources in JasperReportsServer? Please elaborate
Again you can keep the postgresql data source with the sample data, then just add a mysql data source for your real data.  No need to transfer data from postgresql to mysql or vice-versa
ASKER CERTIFIED SOLUTION
johanntagle

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.