Example: Import Foreign Schema v2.6.0

Access data from Advanced Server and connect to psql. Once you are connected to psql, follow the below steps:

-- load extension first time after install
CREATE EXTENSION mysql_fdw;

-- create server object
CREATE SERVER mysql_server
         FOREIGN DATA WRAPPER mysql_fdw
         OPTIONS (host '127.0.0.1', port '3306');

-- create user mapping
CREATE USER MAPPING FOR postgres
    SERVER mysql_server OPTIONS (username 'foo', password 'bar');

-- import foreign schema
IMPORT FOREIGN SCHEMA edb FROM SERVER mysql_server INTO public;

 SELECT * FROM color;
 cid | cname
-----+--------
   1 | Red
   2 | Green
   3 | Orange

SELECT * FROM fruit;
 fid | fname
-----+--------
   1 | Orange
   2 | Mango