ODBC installation and configuration
Ensure to install a supported version of MySQL Server and ODBC Connector. |
You can install the Microsoft ODBC driver (version 13 and later) to connect the ESET PROTECT Server on Linux to Microsoft SQL Server on Windows. For more information, visit this Knowledgebase article. |
Install the MySQL ODBC driver using the Terminal. Follow the steps for your Linux distribution:
•Other supported Linux distributions
Your installation experience may vary according to the supported Linux distribution running on your server. |
Debian, Ubuntu
1.Install unixODBC drivers:
sudo apt-get install unixodbc
2.Download the ODBC connector:
Debian 10 |
wget https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.0.17-linux-debian10-x86-64bit.tar.gz |
Ubuntu 20.04 |
wget https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.0.17-linux-ubuntu19.04-x86-64bit.tar.gz |
Ubuntu 22.04 |
wget https://dev.mysql.com/get/Downloads/Connector-ODBC/9.3/mysql-connector-odbc_9.3.0-1ubuntu22.04_amd64.deb |
Ubuntu 24.04 |
wget https://dev.mysql.com/get/Downloads/Connector-ODBC/9.3/mysql-connector-odbc_9.3.0-1ubuntu24.04_amd64.deb |
•Select and download the version compatible with your Linux distribution and version. •You can download the MySQL ODBC connector from the official MySQL site (earlier versions are also available). |
3.Install the ODBC driver:
ODBC DEB (deb)—Ubuntu 22.04/24.04
See Installing Connector/ODBC from a DEB Distribution.
Run the following command to install a .deb package on Ubuntu:
sudo dpkg -i package_file.deb
ODBC Binary Tarball (tar.gz)—Debian 10 and Ubuntu 20.04
1.Unzip the ODBC driver archive (package name changes depending on link used):
gunzip mysql-connector-odbc-8.0.17-linux-ubuntu19.04-x86-64bit.tar.gz
2.Extract the ODBC driver (package name changes depending on link used):
tar xvf mysql-connector-odbc-8.0.17-linux-ubuntu19.04-x86-64bit.tar
3.Navigate to the ODBC driver folder (package name changes depending on link used):
cd mysql-connector-odbc-8.0.17-linux-ubuntu19.04-x86-64bit
4.Copy ODBC driver files:
sudo cp bin/* /usr/local/bin
sudo cp lib/* /usr/local/lib
5.Register the driver for ODBC.
•For new Linux versions like Ubuntu 20.x, we recommend using the Unicode driver:
sudo myodbc-installer -a -d -n "MySQL ODBC 8.0 Driver" -t "Driver=/usr/local/lib/libmyodbc8w.so"
•For other systems, or when Unicode driver is not working, use this command:
sudo myodbc-installer -a -d -n "MySQL ODBC 8.0" -t "Driver=/usr/local/lib/libmyodbc8a.so"
For more information, see Installing Connector/ODBC from a Binary Tarball Distribution.
Run the following command to list the installed drivers:
sudo myodbc-installer -d -l
Red Hat
1.Install unixODBC drivers:
sudo dnf install unixODBC -y
2.Download the ODBC connector:
wget https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.0.17-1.el7.x86_64.rpm
•Select and download the version compatible with your Linux distribution and version. •You can download the MySQL ODBC connector from the official MySQL site (earlier versions are also available). |
3.Install the ODBC driver:
Do not install the ODBC connector using YUM/DNF—it would install the latest, not compatible version. |
sudo rpm -ivh mysql-connector-odbc-8.0.17-1.e17.x86_64.rpm --nodeps
4.Set up the ODBC driver:
sudo myodbc-installer -a -d -n "MySQL ODBC 8.0.17" -t "Driver=/usr/lib64/libmyodbc8w.so"
5.List the installed drivers:
sudo myodbc-installer -d -l
Other supported Linux distributions
•Select and download the version compatible with your Linux distribution and version. •You can download the MySQL ODBC connector from the official MySQL site (earlier versions are also available). |
1.Follow these instructions to install the ODBC driver:
•Rocky Linux 9: wget https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.1.12/mariadb-connector-odbc-3.1.12-centos7-amd64.tar.gz
•SUSE Linux Enterprise Server: sudo zypper install unixODBC. See also Installing Connector/ODBC from an RPM Distribution
•Installing Connector/ODBC from a Binary Tarball Distribution
2.Run the following command to open the odbcinst.ini file in a text editor:
sudo nano /etc/odbcinst.ini
or sudo nano/etc/unixODBC/odbcinst.ini
3.Copy the following configuration into the odbcinst.ini file (ensure the paths to Driver and Setup are correct), then save and close the file:
[MySQL] |
The Driver may be in a different location for some distributions. You can find the file using the following command:
sudo find /usr -iname "*libmyodbc*"
4.Update the configuration files that control ODBC access to database servers on the current host by running the following command:
sudo odbcinst -i -d -f /etc/odbcinst.ini
or sudo odbcinst -i -d -f /etc/unixODBC/odbcinst.ini