Mariadb ODBC

Having trouble with the MariaDB ODBC driver.

I have installed the unixODBC driver manager & downloaded the MariaDB ODBC driver from mariadb.org https://downloads.mariadb.org/connector-odbc/

Problem: they don’t have a specific build for suse or even opensue. So I’m using the rhel 7 version they have. Also download the source but I don’t know how to properly compile it using cmake. In any case I have added the 32 and 64 bit libraries to the 2 locations /usr/local/lib(64). Configured the odbc.ini & odbcinst.ini in /etc/unixODBC they seem to be recognized the entries but when I run the isql to the DNS entry what it states is that it can’t find the file libmaodbc.so. I checked the permissions and everyone can read it so I don’t know what is wrong.

Tried both 32 & 64 bit files by changing the odbc.ini to use the particular file and both produce the same results.

any ideas ?

Hi
Have you run as root user the command ldconfig (it’s a post install todo after adding libs manually) to update the cache.

No that step was not in the install instructions on mariadb.org. Unfortunately after I did run the ldconfig command I still received the same error.

isql -v mariadb_test
[01000][unixODBC][Driver Manager]Can’t open lib ‘/usr/local/lib64/libmaodbc.so’ : file not found
[ISQL]ERROR: Could not SQLConnect

Thanks for the idea

I also looked at what ldconf did and it shows

libmaodbc.so → libmaodbc.so

not sure if this is correct as I see others that seem to have different names form the library name.

[QUOTE=cisaksen;40618]I also looked at what ldconf did and it shows

libmaodbc.so → libmaodbc.so
and
not sure if this is correct as I see others that seem to have different names form the library name.[/QUOTE]
Hi
So what binary and version (3.0.2?) did you download (since there is no SLE version)?

Seems to compile one needs mariadb-connector-c to build mariadb-connector-odbc, I can build as an rpm (unsupported of course) on OBS, just need the version your wanting?

Hi
OK, found version 3.0.2 here for SP3;
https://download.opensuse.org/repositories/server:/database/SLE_12_SP3/

zypper in https://download.opensuse.org/repositories/server:/database/SLE_12_SP3/x86_64/mariadb-connector-odbc-3.0.2-11.1.x86_64.rpm

Make sure you uninstall/delete the stuff you have added manually.

Unfortunately I get this when I try to install the opensuse version.

Problem: nothing provides libmariadb.so.3()(64bit) needed by mariadb-connector-odbc-3.0.2-11.1.x86_64
Solution 1: do not install mariadb-connector-odbc-3.0.2-11.1.x86_64
Solution 2: break mariadb-connector-odbc-3.0.2-11.1.x86_64 by ignoring some of its dependencies

[QUOTE=cisaksen;40622]Unfortunately I get this when I try to install the opensuse version.

Problem: nothing provides libmariadb.so.3()(64bit) needed by mariadb-connector-odbc-3.0.2-11.1.x86_64
Solution 1: do not install mariadb-connector-odbc-3.0.2-11.1.x86_64
Solution 2: break mariadb-connector-odbc-3.0.2-11.1.x86_64 by ignoring some of its dependencies[/QUOTE]
Hi
Looks like you might have to add;

zypper in https://download.opensuse.org/repositories/server:/database/SLE_12_SP3/x86_64/libmariadb3-3.0.2-30.1.x86_64.rpm

I have a feeling you might need to add as a repository and update the whoe mariadb stack…

Else rebuild the mariadb-connector-odbc and mariadb-connector-c src rpms to match you current config…

I can’t rebuild the mariadb nor do I want to . This is just for monitoring.

You wouldn’t happen to know to how to compile the mariadb-connector from source ? I have the source from https://downloads.mariadb.org/connector-odbc/ but there are no instructions for compiling it. It appears to be setup for a cmake compile but i’m not very familiar with it and not sure of the proper syntax to use.

Also thanks for all your help on this,

[QUOTE=cisaksen;40624]I can’t rebuild the mariadb nor do I want to . This is just for monitoring.

You wouldn’t happen to know to how to compile the mariadb-connector from source ? I have the source from https://downloads.mariadb.org/connector-odbc/ but there are no instructions for compiling it. It appears to be setup for a cmake compile but i’m not very familiar with it and not sure of the proper syntax to use.

Also thanks for all your help on this,[/QUOTE]
Hi
Did you try installing the lib? It’s actually part of mariadb-connector-c package…
https://build.opensuse.org/package/binaries/server:database/mariadb-connector-c?repository=SLE_12_SP3

Ok now where working:

I installed the 2 packages as you suggested and that did the tick. Thanks again for all your help.
https://download.opensuse.org/repositories/server:/database/SLE_12_SP3/x86_64/libmariadb3-3.0.2-30.1.x86_64.rpm
https://download.opensuse.org/repositories/server:/database/SLE_12_SP3/x86_64/mariadb-connector-odbc-3.0.2-11.1.x86_64.rpm