Replication

One Star

Replication

Hello,
Could you help me please?
In fact, I want to make a replication from one mysql database to another. The databases are on different servers which are geographically distant. I used a job with tMysqlInput > tReplicate > tMysqlOutput but it did not work :-(
I don't know if I should specify something in the configuration or if I must change the job...
Thank's for your help! It's really urgent.
Best regards,
Nizar.
Employee

Re: Replication

Hi,
You don't need the tReplicate component. This one is only required when you want replicate a entire flow to different output.
Your JobDesign should be (one per table to migrate) :
tMySQLInput ---> tMySQLOutput
the MySQLInput properties should reflect your SOURCE DATABASE, HOSTNAME, PORT, TABLE and the extraction QUERY.
the MySQLOutput properties will reflect the TARGET DATABASE, HOSTNAME, PORT, TABLE to store the data.
How many tables did you need to migrate/replicate ?
In Talend Integration Suite we offer a special feature to automatically generate Talend Job to MIGRATE numerous tables from a Source to a Target.
Best regards;
One Star

Re: Replication

Hi,
I changed my job to the job design that you proposed: tMySQLInput ---> tMySQLOutput
But the execution still generates errors: I think the connection to the database fails Smiley Sad
Here is the error message:
"Démarrage du job job_de_test a 08:47 03/08/2010.
connecting to socket on port 3896
connected
Exception in component tMysqlOutput_1
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2001)
at com.mysql.jdbc.Connection.<init>(Connection.java:716)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)
at com.mysql.jdbc.Connection.getInstance(Connection.java:295)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at test5.job_de_test_0_1.job_de_test.tMysqlInput_1Process(job_de_test.java:511)
at test5.job_de_test_0_1.job_de_test.runJobInTOS(job_de_test.java:1013)
at test5.job_de_test_0_1.job_de_test.main(job_de_test.java:887)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:168)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:262)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1926)
... 14 more
disconnected
Job job_de_test terminé à 08:47 03/08/2010. "
Thank you very much!
Best regards,
Nizar.
One Star

Re: Replication

Hi,
Please could you help me. It is really very urgent!
Thanks a lot!
Best regards,
Nizar D.
Employee

Re: Replication

Nizar,
Yes; you're right.
The tMysqlOutput_1 component is on failure and generate an exception : Communications link failure.
Make sure your PORT, HOSTNAME and CREDENTIALS (username/pwd) are correct to establish a successful connection.
Best regards;