ubuntu-20.04unixodbcmysql-odbc-connector

How to setup ODBC on Ubuntu 20.04 server


I am trying to setup ODBC for an old application, what use ODBC to connect MySQL DB. Seem like have any tutorial to setup ODBC, or have but old OS version. I tried to install UnixODBC by: sudo apt-get install odbcinst1debian2 libodbc1 odbcinst unixodbc. And now I am trying to install MySQL ODBC. Have 3 method to install it.

  1. Installing Connector/ODBC Using the MySQL Yum Repository (Yum cannot install on Ubuntu 20.04)
  2. Installing Connector/ODBC from a Binary Tarball Distribution (Latest version seem like has not support)
  3. Installing Connector/ODBC from a DEB Distribution I find the way to install a deb package file and try sudo apt install mysql-connector-odbc_8.0.31-1ubuntu20.04_amd64.deb but error Unable to locate package mysql-connector-odbc_8.0.31-1ubuntu20.04_amd64.deb

I am stuck here. And have no way to reseach. Could you help me!!!!!


Solution

  • If you try

    sudo apt-get install mysql-connector-odbc_8.0.31-1ubuntu20.04_amd64.deb
    

    apt-get will try to install it from your repos (and fail). To make it install from your local copy of a .deb file, give it the full path to the .deb file (or prefix with ./ if it's in your current directory).