{question}
How to connect to SingleStore DB using Maria ODBC for Linux with Kerberos Authentication?
{question}
{answer}
In this article, we are going to discuss connecting to SingleStore DB using Maria ODBC for Linux using Kerberos Authentication.
- Please Install the required libraries, check the below command:
sudo apt update 2sudo apt-get install unixodbc libssl-dev libmariadb-dev -y
- Download the latest version of the Maria DB ODBC for Linux, the list of the available files is located here: All Files - ODBC connector 3.1.17.
wget https://dlm.mariadb.com/2454050/Connectors/odbc/connector-odbc-3.1.17/mariadb-connector-odbc-3.1.17-ubuntu-jammy-amd64.tar.gz
- Please execute the following commands:
tar -xvzf mariadb-connector-odbc-3.1.17-ubuntu-jammy-amd64.tar.gz
cd mariadb-connector-odbc-3.1.17-ubuntu-jammy-amd64/
sudo install lib/mariadb/libmaodbc.so /usr/lib
sudo install -d /usr/lib/mariadb/
sudo install -d /usr/lib/mariadb/plugin/
- The next step is to Create the ODBC.ini file for the current user:
vim ~/.odbc.ini
- Let's paste the following configuration changing the values for your system:
[{ODBCNAME}]
Description = S2
Driver = /usr/lib/libmaodbc.so
Database = krb
SERVER = 10.30.0.27
USER = krb1
PORT = 3306
- Copy the
auth_gssapi_client.so
file to the proper location, this is a fixed location.
sudo cp auth_gssapi_client.so /usr/lib/x86_64-linux-gnu/libmariadb3/plugin/
- Let's Get a token for the user to connect:
kinit krb1
Password for krb1@S2.LOCAL:
- Use isql to test the ODBC connection:
isql -v {ODBCNAME}
In case of any issues, kindly reach out to SingleStore Support.
{answer}