0

I tried using migrate mysql to postgresql. It Exist error for Below Message.

Erro Message: 11:05:39 SELECT * FROM fed_orders LIMIT 0, 1000 Error Code: 1159. Got timeout reading communication packets 30.051 sec.

Steps Used:

a) Activate Federated Engine in Mysql.

Configure /etc/my.cnf , add 'federated' keyword in [mysqld] section, then restart mysql Service.

b) Create Federated Server

CREATE SERVER fedlink FOREIGN DATA WRAPPER mysql OPTIONS (USER 'postgres', HOST '103.93.107.148', PORT 5432, DATABASE 'MOA_DB');

b) Link mysql table with fedlink server

CREATE TABLE fed_orders (
id     INT(20),
name   VARCHAR(32) NOT NULL DEFAULT '') ENGINE=FEDERATED DEFAULT CHARSET=utf8mb4 CONNECTION='fedlink/fed_orders';
Kamil Gosciminski
  • 16,547
  • 8
  • 49
  • 72
Kalidoss KN
  • 41
  • 1
  • 9
  • Possible duplicate of [how to access postgres from mysql?](https://stackoverflow.com/questions/26385118/how-to-access-postgres-from-mysql) – Solarflare Jul 04 '18 at 06:47
  • yes .. i also want duplicate mysql table to postgres table – Kalidoss KN Jul 04 '18 at 10:14
  • 1
    Was this a reply to my comment? The point of my comment (and the duplicate flag) was: read the other question, it asked basically the same thing. And the answer to that question was that you cannot access postgres from mysql, you can just connect to other *mysql* servers from mysql. And that is the exact answer to your question too: you just cannot to it (yet), that is why you get an error message. You can however connect *from* postgres *to* mysql (but that would be a different question). And if you really want to migrate (copy once), there are tools for that (and also a different question). – Solarflare Jul 04 '18 at 11:58
  • Ok. I agree. What was the sollution for sending mysql data into postgres.. – Kalidoss KN Jul 06 '18 at 14:44
  • For the opposite direction, have a look at (e.g.) [Setup Mysql Foreign Data Wrapper in Postgresql](https://stackoverflow.com/a/41576892/6248528) – Solarflare Jul 07 '18 at 07:08

0 Answers0