I have a table in Postgres that I need to reflect in MySQL. I found this http://wiki.postgresql.org/wiki/Foreign_data_wrapper#mysql_fdw though the directions are very unclear how to actually link to MySQL. CREATE FOREIGN TABLE works in Postgres but is a syntax error in MySQL. After running running all of the CREATE FOREIGN TABLE and creating the CREATE SERVER mysql_svr in Postgres, no data magically appear in MySQL, so I must be missing a step, they don't provide.
mysql> CREATE FOREIGN TABLE ex_staff ( id integer, name text, address text) SERVER mysql_svr OPTIONS (query ‘SELECT * FROM hr.employees WHERE date_left IS NOT NULL’);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOREIGN TABLE ex_staff ( id integer, name text, address text) SERVER mysql_svr O' at line 1