How to Install the MySQL ODBC Driver on Ubuntu 16.04 or Linux Mint 18.x

Source: https://www.datasunrise.com/blog/

# Download the ODBC driver:

Download ODBC driver for Ubuntu 16.04

wget https://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit.tar.gz

# Extract:

tar -xvf mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit.tar.gz

# Copy the driver to the ODBC folder:

sudo cp mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/lib/libmyodbc5* /usr/lib/x86_64-linux-gnu/odbc/

# Install:

sudo mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/bin/myodbc-installer -d -a -n "MySQL" -t "DRIVER=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc5w.so;"

# Check:

sudo mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/bin/myodbc-installer -s -a -c2 -n "test" -t "DRIVER=MySQL;SERVER=127.0.0.1;DATABASE=mysql;UID=root;PWD=password"

[Result should be “Success”]

# Download the 32-bit ODBC driver:

Download 32-bit ODBC driver for Ubuntu 16.04

wget https://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-32bit.tar.gz

# Extract:

tar -xvf mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-32bit.tar.gz

# Copy the driver to the ODBC folder:

sudo cp mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-32bit/lib/libmyodbc5* /usr/lib/i386-linux-gnu/odbc/

# Install:

sudo mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-32bit/bin/myodbc-installer -d -a -n "MySQL" -t "DRIVER=/usr/lib/i386-linux-gnu/odbc/libmyodbc5w.so;"

# Check:

sudo mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-32bit/bin/myodbc-installer -s -a -c2 -n "test" -t "DRIVER=MySQL;SERVER=127.0.0.1;DATABASE=mysql;UID=root;PWD=password"

[Result should be “Success”]

2 thoughts on “How to Install the MySQL ODBC Driver on Ubuntu 16.04 or Linux Mint 18.x”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s