About Store Forum Documentation Contact



Post Reply 
MySQL connection on Ubuntu
Author Message
Lancer Offline
Member

Post: #1
MySQL connection on Ubuntu
Im trying to do a mysql connection on my ubuntu server.
I've installed MariaDB and can connect from terminal and remote without any issue.
But Im always getting this error: : [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed

Config I use
Code:
IP=127.0.0.1
    User=project
    Pass=password
    Database=testdb
    Driver=`/usr/lib/x86_64-linux-gnu/libodbc.so`

Code:
Code:
EE::SQL m_SQL;
    if (m_SQL.connectMySQL(g_pConfig->ip, g_pConfig->database, g_pConfig->user, g_pConfig->pass, &message, 0, g_pConfig->driver) == false)
    {
        Exit(S + "Error: " + message);
    }

Server: Ubuntu 20.10

Anyone an idea how to fix this issue?
Could not find anything on google
03-06-2021 09:14 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #2
RE: MySQL connection on Ubuntu
Please check an example of the driver name here:
https://www.esenthel.com/?id=doc#API/Net/Sql

(driver name is not the path to a library file)
(This post was last modified: 03-07-2021 01:50 AM by Houge.)
03-07-2021 01:47 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: MySQL connection on Ubuntu
https://stackoverflow.com/questions/5547...ct-when-co
Sounds like this is a problem of SQL / OS configuration.
If you can't fix it, for easy life you can switch to sqlite (no installation necessary) or another database.
03-07-2021 03:37 AM
Find all posts by this user Quote this message in a reply
Lancer Offline
Member

Post: #4
RE: MySQL connection on Ubuntu
Thanks.
I managed to fix this issue by installing unixODBC from source and configure the odbcinst.ini like here https://mariadb.com/kb/en/creating-a-dat...ectorodbc/
(This post was last modified: 03-07-2021 02:13 PM by Lancer.)
03-07-2021 02:11 PM
Find all posts by this user Quote this message in a reply
Post Reply