ODBC Linux Installation
The next steps shows how to install the LeanXcale ODBC Driver for Linux. This procedure has been tested in Ubuntu 20.04 LTS, but it should work on other distributions too.
-
Install prerequisite packages:
sudo apt-get install unixodbc unixodbc-dev
unixodbc-dev
package is used by some extensions that needs to be compiled to be installed. -
Download the ODBC Connector from the Drivers page and unpack it.
-
Copy the file
libodbclx.so
into/opt/leanxcale/odbc/client
directory:mkdir -p /opt/leanxcale/odbc/client cp libodbclx.so /opt/leanxcale/odbc/client
Make sure that the PHP user has read and execute permissions for
libodbclx.so
.For example:
chmod +rx www-data /opt/leanxcale/odbc/client/libodbclx.so
-
Create the file
$HOME/.odbcinst.ini
with this content:[LeanXcaleODBCDriver] Description = LeanXcale ODBC Driver for Linux Driver = /opt/leanxcale/odbc/client/libodbclx.so UsageCount = 1
-
Create the file
$HOME/.odbc.ini
with this content:[LeanXcaleTests] Driver = LeanXcaleODBCDriver Description = Sample Database to be used for tests Trace = No Server = 123.45.67.89 # IP / hostname of your LeanXcale instance Port = 1529 Database = dbtest UserName = user1 Password = pass4user1 Encoding = WCHAR_T
By default, ODBC driver managers are configured to use hidden versions of the If you store these configuration files elsewhere, you must set these environment variables:
The driver manager will then be able to locate the files. |
ODBC Windows Installation
Installing the ODBC Connector
-
Download the ODBC Connector for Windows from the Drivers page
-
Run the installer
lx-odbc-setup-1.5.4.exe
-
The default installation directory is
C:\Program Files\Leanxcale\lx-odbc-driver
-
If asked to install Visual C++ redistributable, follow the setup guide; just click Next as needed.
Registry Keys
The setup adds the relevant keys to the registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI]
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
"LX DRIVER(x64)"="Installed"
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\LX DRIVER(x64)]
"Driver"="[TARGETDIR]LXODBC.DLL"
"Setup"="[TARGETDIR]LXODBCSETUP.DLL"
"APILevel"="1"
"ConnectFunctions"="YYN"
"DriverODBCVer"="03.00"
"FileUsage"="0"
"SQLLevel"="3"
ODBC Data Source Administrator
When the driver has been installed, you can add the data source from the ODBC Data Source Administrator.
The datasource can be added from the User DSN tab:
-
Click Add
-
Select LX DRIVER(x64) from the driver list
With the driver selected, you can configure the Data Source Name properties:

Property | Description | Sample Values | Comment |
---|---|---|---|
Data Source |
Identifier for the datasource |
ODBC logical name |
|
Description |
User friendly description of the database |
||
Database name |
Identifier for the database |
||
SSL mode |
SSL mode to use for connection |
|
Not yet supported |
Host |
LeanXcale server DNS or IP |
||
Port |
LeanXcale server access port |
||
User |
Login to database |
||
Password |
Database password |
||
Trace |
Error reporting level |
|
|
TraceFile |
Location of error log file |
|
|
Encoding |
|
||
ANSI Encoding |
|
The Windows ODBC driver is an ANSI driver, but it supports unicode data. |