Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding extension mysql_fdw to postgres-gis #3888

Open
jahnavisana2812 opened this issue Apr 15, 2024 · 2 comments
Open

Adding extension mysql_fdw to postgres-gis #3888

jahnavisana2812 opened this issue Apr 15, 2024 · 2 comments

Comments

@jahnavisana2812
Copy link

jahnavisana2812 commented Apr 15, 2024

I'm attempting to construct a Dockerfile using the postgres-gis-ubi8 base image. The extension I aim to install is mysql_fdw, a foreign data wrapper allowing PostgreSQL to interact with MySQL. To ensure successful installation, it's necessary to run the makefile. However, I consistently encounter an error with the makefile. I've included the Dockerfile below along with the link to the extension I intend to install. Any assistance would be greatly appreciated. Thanks in advance!
Link of the extension:https://github.com/EnterpriseDB/mysql_fdw

FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.1-3.4-0
USER root
ARG myqld_fdw_release=2_9_1

ADD https://github.com/EnterpriseDB/mysql_fdw/archive/refs/tags/REL-${myqld_fdw_release}.tar.gz \
    /tmp/mysql-fdw.tar.gz

RUN tar -xvf /tmp/mysql-fdw.tar.gz -C /tmp --one-top-level --strip-components 1 && \
    rm -rf /tmp/mysql-fdw.tar.gz
WORKDIR /tmp/mysql-fdw

RUN export PATH=/usr/pgsql-16/bin/:$PATH
RUN make USE_PGXS=1
RUN make USE_PGXS=1 install

USER 26

Error I keep getting:

make: mysql_config: Command not found
make: mysql_config: Command not found
Makefile:44: *** PostgreSQL 11, 12, 13, 14, 15, or 16 is required to compile this extension.  Stop.
@andrewlecuyer
Copy link
Collaborator

hi @jahnavisana2812! This issue/error appears to be related the referenced extension, rather than anything with Crunchy Postgres for Kubernetes itself. E.g., nothing here indicates an issue with the Postgres container (e.g. the PATH provided for Postgres is valid, etc.).

I therefore suggest trying your question with the maintainers of the extension, e.g. to get better insight into why these Make targets are failing, and what dependencies, setup, etc. is needed to make this work.

And in the meantime, I'll leave this issue open in case anyone else out there has any insight and/or ideas to help with your issue. Additionally, I'll note that you can try reaching out via the PGO project community discord as well.

@jahnavisana2812
Copy link
Author

jahnavisana2812 commented Apr 16, 2024

Update:I have talked to their team and they have insisted to install mysql client library to compile mysql_fdw using sources.I was trying to install mysql client but keeps throwing error Unable to find package.Please suggest the right way to install.I was doing it the following way.

FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.1-3.4-0
USER root
ARG myqld_fdw_release=2_9_1

ADD https://github.com/EnterpriseDB/mysql_fdw/archive/refs/tags/REL-${myqld_fdw_release}.tar.gz \
    /tmp/mysql-fdw.tar.gz
RUN microdnf install yum
RUN microdnf install dnf
RUN tar -xvf /tmp/mysql-fdw.tar.gz -C /tmp --one-top-level --strip-components 1 && \
    rm -rf /tmp/mysql-fdw.tar.gz
RUN dnf install mysql-server

WORKDIR /tmp/mysql-fdw

RUN export PATH=/usr/pgsql-16/bin/:$PATH
RUN make USE_PGXS=1
RUN make USE_PGXS=1 install

USER 26

Error: Unable to find a match: mysql-server
@andrewlecuyer can you suggest something on this I am unable to install it even using the rpm package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants