Closed Daniel-4act closed 8 years ago
I found a rather quick and maybe dirty fix.
First locate libmysqlclient.so
, then copy it to /usr/local/pgsql/lib
or your defined pg datadir.
This work around worked for me, just my path for postgres extension drivers was different:
/usr/pgsql-9.5/lib
After I installed the following, CREATE EXTENSION mysql_fdw;
worked for me:
sudo apt-get install libmysqlclient-dev
(I also sudo apt-get install mysql-server
before libmysqlclient-dev
which didn't work... I'm not sure if that is also needed?)
$ psql postgres psql (9.4.4) Type "help" for help.
postgres=# \c postgres postgres You are now connected to database "postgres" as user "postgres". postgres=# create extension mysql_fdw; ERROR: failed to load the mysql query: No such file or directory HINT: export LD_LIBRARY_PATH to locate the library postgres=#
I am trying to run this in cygwin on windows 10 machine with both a working postgreSQL and MySQL running in cygwin. The Makefile compliled and installed without error. Role postgres is a superuser.
I tried shutting down the postgreSQL sever and export LD_LIBRARY_PATH to any path in cygwin that was in a mysql folder including the folder that I unzipped to containing the mysql_query files(see below). restarted server in same terminal and then ran the create extensionn but same error. export LD_LIBRARY_PATH="cygdrive/c/Program Files/MySQL/MySQL Connector C 6.1/:/var/lib/mysql/mysql/:home/Daniel Miller/mysql_fdw-master/:usr/share/mysql/:lib/mysql/plugins/:usr/include/mysql/:usr/include/mysql/mysql/"