# Mariadb ODBC

**URL:** https://forums.suse.com/t/mariadb-odbc/30688
**Category:** SLES Configure-Administer
**Created:** [December 19, 2017, 4:19pm UTC](https://forums.suse.com/t/mariadb-odbc/30688 "2017-12-19T16:19:06Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)
#### Post date: [December 19, 2017, 4:19pm UTC](https://forums.suse.com/t/mariadb-odbc/30688/1 "2017-12-19T16:19:06Z")

</div>

Having trouble with the MariaDB ODBC driver.

I have installed the unixODBC driver manager & downloaded the MariaDB ODBC driver from [mariadb.org](http://mariadb.org)[https://downloads.mariadb.org/connector-odbc/](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 ?

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [December 19, 2017, 4:48pm UTC](https://forums.suse.com/t/mariadb-odbc/30688/2 "2017-12-19T16:48:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)
#### Post date: [December 19, 2017, 5:08pm UTC](https://forums.suse.com/t/mariadb-odbc/30688/3 "2017-12-19T17:08:59Z")

</div>

No that step was not in the install instructions on [mariadb.org](http://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

---

<div class="post-metadata">

### Author: ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)
#### Post date: [December 19, 2017, 5:13pm UTC](https://forums.suse.com/t/mariadb-odbc/30688/4 "2017-12-19T17:13:22Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [December 19, 2017, 5:52pm UTC](https://forums.suse.com/t/mariadb-odbc/30688/5 "2017-12-19T17:52:36Z")

</div>

[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?

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [December 19, 2017, 8:05pm UTC](https://forums.suse.com/t/mariadb-odbc/30688/6 "2017-12-19T20:05:16Z")

</div>

Hi  
OK, found version 3.0.2 here for SP3;  
[https://download.opensuse.org/repositories/server:/database/SLE\_12\_SP3/](https://download.opensuse.org/repositories/server:/database/SLE_12_SP3/)

```auto
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.

---

<div class="post-metadata">

### Author: ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)
#### Post date: [December 19, 2017, 11:08pm UTC](https://forums.suse.com/t/mariadb-odbc/30688/7 "2017-12-19T23:08:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [December 20, 2017, 12:06am UTC](https://forums.suse.com/t/mariadb-odbc/30688/8 "2017-12-20T00:06:25Z")

</div>

[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;

```auto
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…

---

<div class="post-metadata">

### Author: ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)
#### Post date: [December 20, 2017, 12:31am UTC](https://forums.suse.com/t/mariadb-odbc/30688/9 "2017-12-20T00:31:02Z")

</div>

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/](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,

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [December 20, 2017, 1:30am UTC](https://forums.suse.com/t/mariadb-odbc/30688/10 "2017-12-20T01:30:26Z")

</div>

[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/](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](https://build.opensuse.org/package/binaries/server:database/mariadb-connector-c?repository=SLE_12_SP3)

---

<div class="post-metadata">

### Author: ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)
#### Post date: [December 20, 2017, 3:33pm UTC](https://forums.suse.com/t/mariadb-odbc/30688/11 "2017-12-20T15:33:07Z")

</div>

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/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](https://download.opensuse.org/repositories/server:/database/SLE_12_SP3/x86_64/mariadb-connector-odbc-3.0.2-11.1.x86_64.rpm)
