1

Have an issue with MySQL ODBC Driver on Ubuntu 22.04 with Tableau Server. Attempting to connect result in error:

[unixODBC][Driver Manager]Can't open lib '/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so' : file not found

But file exists:

    tableau@tableau:/tmp$ namei /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
    f: /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
     d /
     d usr
     d lib
     d x86_64-linux-gnu
     d odbc
     - libmyodbc8w.so

Originally system was installed on AL2 with ODBC Mysql Driver 5.x.x. Ofc it needed migration. Was selected Ubuntu 22.04 LTS. Driver was used initially 8.2.x.

After "help" from Tableau developers it was downgraded to 8.0.x.

Error still exists. In software looks like no deep debug for driver callout. Issue must be with it, cuz no attempt to connect is made (according to dumping).

Current config:

tableau@tableau:/tmp# cat /etc/odbc.ini 

[tableau]
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
Description = ODBC for MySQL
SERVER = <my_server_replaced>
PORT = <my_port_replaced>
Database = <my_db_replaced>
USER = <my_user_replaced>
Password = <my_pwd_replaced>
tableau@tableau:/tmp# cat /etc/odbcinst.ini 
[MySQL ODBC 8.0 Unicode Driver]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
SETUP=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8S.so
UsageCount=1

[MySQL ODBC 8.0 ANSI Driver]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
SETUP=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8S.so
UsageCount=1

Current driver:

tableau@tableau# apt info -a mysql-connector-odbc
Package: mysql-connector-odbc
Version: 8.0.33-1ubuntu22.04
Status: install ok installed
Priority: optional
Section: libs
Maintainer: Oracle MySQL Product Engineering Team <[email protected]>
Installed-Size: 23.4 MB
Depends: dpkg-dev, mysql-community-client-plugins, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.34), libgcc-s1 (>= 3.0), libodbc2 (>= 2.3.1), libodbcinst2 (>= 2.3.1), libssl3 (>= 3.0.0~~alpha1), libstdc++6 (>= 11)
Conflicts: mysql-connector-odbc-commercial
Homepage: http://dev.mysql.com/downloads/connector/odbc/
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: MySQL ODBC driver
 This package allows you to connect to MySQL database servers using
 ODBC, the Open Database Connectivity abstraction layer which is
 understood by a variety of database tools that cannot talk to MySQL
 databases directly.

No issues with deps:

tableau@tableau:/tmp$ ldd -v /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
    linux-vdso.so.1 (0x00007ffee2b70000)
    libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x000073b38da27000)
    libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x000073b38cc00000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x000073b38da13000)
    libodbcinst.so.2 => /lib/x86_64-linux-gnu/libodbcinst.so.2 (0x000073b38d9fe000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x000073b38c800000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000073b38d1e0000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000073b38c400000)
    /lib64/ld-linux-x86-64.so.2 (0x000073b38dad4000)
    libltdl.so.7 => /lib/x86_64-linux-gnu/libltdl.so.7 (0x000073b38d1d5000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000073b38d0ee000)

    Version information:
    /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so:
        libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
        libresolv.so.2 (GLIBC_2.9) => /lib/x86_64-linux-gnu/libresolv.so.2
        libcrypto.so.3 (OPENSSL_3.0.0) => /lib/x86_64-linux-gnu/libcrypto.so.3
        libstdc++.so.6 (GLIBCXX_3.4.20) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (CXXABI_1.3.8) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.9) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (CXXABI_1.3.9) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.29) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.18) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.11) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (CXXABI_1.3) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.21) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (CXXABI_1.3.5) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4.15) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4) => /lib/x86_64-linux-gnu/libstdc++.so.6
        libssl.so.3 (OPENSSL_3.0.0) => /lib/x86_64-linux-gnu/libssl.so.3
        libc.so.6 (GLIBC_2.28) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libssl.so.3:
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libcrypto.so.3 (OPENSSL_3.0.3) => /lib/x86_64-linux-gnu/libcrypto.so.3
        libcrypto.so.3 (OPENSSL_3.0.0) => /lib/x86_64-linux-gnu/libcrypto.so.3
    /lib/x86_64-linux-gnu/libcrypto.so.3:
        libc.so.6 (GLIBC_2.15) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.25) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.16) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libresolv.so.2:
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libodbcinst.so.2:
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libstdc++.so.6:
        libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
        ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
        libgcc_s.so.1 (GCC_4.2.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libgcc_s.so.1 (GCC_3.4) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libgcc_s.so.1 (GCC_3.3) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.6) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.33) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.25) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.18) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.16) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.32) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libgcc_s.so.1:
        libc.so.6 (GLIBC_2.35) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libc.so.6:
        ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
        ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
        ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    /lib/x86_64-linux-gnu/libltdl.so.7:
        libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.34) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    /lib/x86_64-linux-gnu/libm.so.6:
        ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
tableau@tableau:/tmp$ isql -v tableau
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

AppArmor: tried to disable completely -> same results. In logs no denies from it. So kept "as-is".

Will greatly appreciate any hint or help!

2 Answers 2

1

Looks like it is Tableau server issue. As I said I'm running Ubuntu 22.04 LTS (officially marked as supported OS on website) and there is no precompiled driver 5.x available on mysql website

As workaround I built driver 5.3.13 from source and set odbcinst.ini to this:

[MySQL ODBC 8.0 Unicode Driver]
Driver=/usr/local/lib/libmyodbc5w.so
UsageCount=1

So latest server will think that this is 8.x but will use 5.x... And yes, if config name will contain 5.x -> server will throw an error. Weird - yes. But it is working. Devs through support ticket not commenting this behavior...

Sign up to request clarification or add additional context in comments.

1 Comment

Had the same problem and used the same solution. I used the precompiled generic linux drivers for 5.3.13 (downloads.mysql.com/archives/get/p/10/file/…) and it worked on Amazon Linux 2023. I have to say I wasted a lot of time on this one, compiling multiple versions of the 8.x drivers and 9.0 drivers. Such an annoying error.
0

I think I finally solved this one. Had to do a Tableau Server upgrade and started the whole blue/green process and hit this same issue. After many hours and thanks god for Gemini I think I landed on a solution that worked for both Ubuntu 24.04 and AL 2023 with Mysql Connector/ODBC 9.5.0 (I assume it would work with 8.x.x too).

This was tested both on Tableau Server for linux version 2025.1.9 and 2023.3.9.

Description: If you are installing Tableau Server (2024.x or 2025.x) on modern Linux distributions like Ubuntu 24.04 or Amazon Linux 2023, you may encounter persistent errors when connecting to MySQL or AWS Aurora, even after installing the official MySQL ODBC drivers (v8 or v9).

The Symptoms

Tableau displays a generic error, or a specific "File not found" error, even though the driver file definitely exists at the path specified in /etc/odbcinst.ini.

The (very vague!!) Error Message:

An error occurred while communicating with Amazon Aurora for MySQL. There was an unknown connection error to the database. [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc9w.so' : file not found

The Root Cause

This is a Library Dependency Conflict (DLL Hell), not a missing file.

  1. Modern OS: Ubuntu 24.04 and AL2023 ship with modern C++ standard libraries (e.g., GLIBCXX_3.4.32). The MySQL ODBC driver is compiled against these.

  2. Tableau Server: Bundles its own internal, older version of libstdc++.so.6 in its bin directory.

  3. The Crash: When Tableau loads the driver, the Linux loader sees that Tableau has already loaded libstdc++. It forces the driver to use Tableau's old version. The driver checks for the new symbols it needs, fails to find them, and the loader aborts with a misleading "File not found" error.

The Solution: The "Sidecar & Rename" Method

You cannot simply replace Tableau's library (it will crash the server). You must create a "Sidecar" folder containing the driver and a renamed copy of the system's C++ library. Renaming it tricks the Linux loader into allowing both versions to exist in memory simultaneously.

Here is the step-by-step fix for both operating systems.


Instructions for Ubuntu 24.04 LTS

1. Install Prerequisites You need patchelf to modify the driver binary.

Bash

sudo apt update && sudo apt install -y patchelf

2. Create the Sidecar Directory Find your active Tableau bin directory and create a subfolder.

Bash

# Locate your versioned bin directory
TAB_BIN=$(ls -d /opt/tableau/tableau_server/packages/bin.* | sort -V | tail -1)

# Create a fixed folder inside it (AppArmor trusts this path)
sudo mkdir -p "$TAB_BIN/odbc_fixed"

3. Copy Driver & System Libraries

Bash

# Copy the ODBC driver (Adjust path if using v8)
sudo cp /usr/lib/x86_64-linux-gnu/odbc/libmyodbc9w.so "$TAB_BIN/odbc_fixed/"

# Copy the SYSTEM version of libstdc++ (The one the driver needs)
sudo cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "$TAB_BIN/odbc_fixed/"
sudo cp /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 "$TAB_BIN/odbc_fixed/"

4. Rename and Patch (The Magic Step) We rename the library so it doesn't conflict with Tableau's loaded version.

Bash

cd "$TAB_BIN/odbc_fixed"

# 1. Rename the library
sudo mv libstdc++.so.6 libstdc++_custom.so.6

# 2. Update the driver to look for this NEW filename
sudo patchelf --replace-needed libstdc++.so.6 libstdc++_custom.so.6 libmyodbc9w.so

# 3. Force driver to look in its current folder ($ORIGIN)
sudo patchelf --set-rpath '$ORIGIN' --force-rpath libmyodbc9w.so

# 4. Fix permissions
sudo chown -R tableau:tableau "$TAB_BIN/odbc_fixed"

Instructions for Amazon Linux 2023 (AL2023)

1. Install Prerequisites

Bash

sudo dnf install -y patchelf binutils

2. Create the Sidecar Directory

Bash

# Locate your versioned bin directory
TAB_BIN=$(ls -d /opt/tableau/tableau_server/packages/bin.* | sort -V | tail -1)

# Create the folder
sudo mkdir -p "$TAB_BIN/odbc_fixed"

3. Copy Driver & System Libraries AL2023 stores libraries in /lib64.

Bash

# Copy the driver (Adjust path if using v8)
sudo cp /usr/lib64/libmyodbc9w.so "$TAB_BIN/odbc_fixed/"

# Copy the SYSTEM version of libstdc++
sudo cp /lib64/libstdc++.so.6 "$TAB_BIN/odbc_fixed/"
sudo cp /lib64/libgcc_s.so.1 "$TAB_BIN/odbc_fixed/"

4. Rename and Patch

Bash

cd "$TAB_BIN/odbc_fixed"

# 1. Rename the library
sudo mv libstdc++.so.6 libstdc++_custom.so.6

# 2. Update the driver to look for this NEW filename
sudo patchelf --replace-needed libstdc++.so.6 libstdc++_custom.so.6 libmyodbc9w.so

# 3. Force driver to look in its current folder ($ORIGIN)
sudo patchelf --set-rpath '$ORIGIN' --force-rpath libmyodbc9w.so

# 4. Fix permissions
sudo chown -R tableau:tableau "$TAB_BIN/odbc_fixed"

Final Step: Update Configuration (Both OS)

  1. Edit your ODBC configuration:

    Bash

    sudo nano /etc/odbcinst.ini
    
    
  2. Update the Driver path to point to your new patched file. Do not use the default path.

    Example:

    Ini, TOML

    [MySQL ODBC 9.0 Unicode Driver]
    Description = MySQL 9.0 Driver
    # Update this line to match your specific bin path from step 2
    Driver      = /opt/tableau/tableau_server/packages/bin.20251.xx.xx.xx/odbc_fixed/libmyodbc9w.so
    UsageCount  = 1
    
    
  3. Restart Tableau Server to apply changes:

    Bash

    tsm restart
    
    

Note: If you upgrade Tableau Server versions, this bin directory will change. You will need to re-run these steps for the new version's directory.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.