Unable to connect to Oracle using MariaDB connect storage engine

52 Views Asked by At

I am using the connect storage engine to access the Oracle data from MariaDB.

I have installed Oracle client, unixodbc, and MariaDB connect engine and properly configured the odbc* files and able to connect to Oracle and search the data using odbc, i.e., isql, but getting the below error when I am creating the table from mysql client.

ODBC Prompt:

 isql -v oracle
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

MYSQL CLI:

ERROR 1105 (HY000): SQLDriverConnect: [unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1' : file not found
MariaDB [test]>

I have verified all the odbc* config and validated the Oracle cli location; everything looks good.

ls -l /usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1
-rwxr-xr-x 1 root root 4421284 Jul  7  2014 /usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1
1

There are 1 best solutions below

0
Prabhakar Repalle On

It seems the env variables are getting overwritten or ignored when starting the mariadb services. For that, I have added the LD_LBRARY_PATH to MariaDB.services, and it fixed the issue.