Tableau can help you see and understand data from 60+ data sources.
Tableau Desktop 2018.3 on a Windows computer by default will install these drivers:
- Amazon Redshift (version 1.3.7)
- Microsoft SQL Server (13.0.811.168 – ODBC Driver 13 for SQL Server)
- PostgreSQL (version 9.6.2)
Tableau Desktop 2018.3 on a Mac OSX computer by default will install these drivers:
- Oracle (version 11.2.0.5)
- PostgreSQL (version 9.5.3)
- Simba Spark (version 1.2.5)
- Simba SQL Server (version 1.3.14)
- Amazon Redshift (version 1.3.7)
If what you need is not on the above list then you need to manually install it, you can download the drivers from tableau driver download website here: https://www.tableau.com/support/drivers
Installing database drivers on Windows & Mac OSX are usually easy and most of them just click next next next.
But it’s not so straight forward for Linux os. And Linux is pretty new for tableau windows-centric customers so i will give you the step by step details with the terminal output.
Let’s start with MySQL database driver installation for Linux. Tableau Server support Centos / RHEL distribution & Ubuntu distribution. So this tutorial is to setup MySQL ODBC driver on Ubuntu Linux so Tableau Server installed on the same Ubuntu Linux can connect and query data from MySQL in any OS and at any computer.
For Centos / RHEL distribution you can just use yum to install MySQL driver, more details here.
For Ubuntu distribution you cannot use yum or RPM file so we need to download the binary tarball distribution, unzip it, install unixodbc and configure it. Official documentation from MySQL available here.
The official documentation assume you have a good linux skill-sets and have experiences installing database drivers in linux os so it’s lacking in details. I will give you the details 🙂
Download the binary tarball distribution file
Download the tar.gz file from here. And check if it’s downloaded.
ubuntuadmin@uts1051:~/Downloads$ ls -al
total 1471708
drwxr-xr-x 2 ubuntuadmin ubuntuadmin 4096 Feb 27 18:21 .
drwxr-xr-x 20 ubuntuadmin ubuntuadmin 4096 Feb 28 13:27 ..
-rw-rw-r– 1 ubuntuadmin ubuntuadmin 11583426 Feb 27 18:21 mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit.tar.gz
Extract / unzip it
ubuntuadmin@uts1051:~/Downloads$ gunzip mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit.tar.gz
ubuntuadmin@uts1051:~/Downloads$ tar xvf mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit.tar
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/ChangeLog
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/COPYING
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/README
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/bin/myodbc-installer
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/README.debug
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/INSTALL
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/Licenses_for_Third-Party_Components.txt
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/lib/libmyodbc5w.so
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/lib/libmyodbc5S.so
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/lib/libmyodbc5a.so
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_curext
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_param
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_result1
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_crash
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_dyn_cursor
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_catalog2
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_blob
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_datetime
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_scroll
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_keys
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_types
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_tran
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_pooling
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_error
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_cursor
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_prepare
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_desc
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/odbcinst.ini
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/CTestTestfile.cmake
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_setup
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/odbc.ini
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_unixodbc
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_bug13766
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_auth
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_use_result
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_relative
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_info
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_catalog1
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_basics
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_unicode
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_bulk
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/test/my_result2
ubuntuadmin@uts1051:~/Downloads$ ls
mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit
Go to the unzipped folder
ubuntuadmin@uts1051:~/Downloads$ cd mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit/
ubuntuadmin@uts1051:~/Downloads/mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit$ ls
bin ChangeLog COPYING INSTALL lib Licenses_for_Third-Party_Components.txt README README.debug test
copy all files inside bin folder to /usr/local/bin/ folder
ubuntuadmin@uts1051:~/Downloads/mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit$ sudo cp bin/* /usr/local/bin/
[sudo] password for ubuntuadmin:
copy all files inside lib folder to /usr/local/lib/ folder
ubuntuadmin@uts1051:~/Downloads/mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit$ sudo cp lib/* /usr/local/lib/
install unixodbc & unixodbc-dev softwares
ubuntuadmin@uts1051:~/Downloads/mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit$ sudo apt-get install unixodbc unixodbc-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
libltdl-dev libodbc1 libtool odbcinst odbcinst1debian2
Suggested packages:
libtool-doc libmyodbc odbc-postgresql tdsodbc unixodbc-bin autoconf automaken gfortran | fortran95-compiler gcj-jdk
The following NEW packages will be installed:
libltdl-dev libodbc1 libtool odbcinst odbcinst1debian2 unixodbc unixodbc-dev
0 upgraded, 7 newly installed, 0 to remove and 164 not upgraded.
Need to get 827 kB of archives.
After this operation, 4,550 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://sg.archive.ubuntu.com/ubuntu xenial/main amd64 libltdl-dev amd64 2.4.6-0.1 [162 kB]
Get:2 http://sg.archive.ubuntu.com/ubuntu xenial/main amd64 libodbc1 amd64 2.3.1-4.1 [180 kB]
Get:3 http://sg.archive.ubuntu.com/ubuntu xenial/main amd64 libtool all 2.4.6-0.1 [193 kB]
Get:4 http://sg.archive.ubuntu.com/ubuntu xenial/main amd64 odbcinst1debian2 amd64 2.3.1-4.1 [41.1 kB]
Get:5 http://sg.archive.ubuntu.com/ubuntu xenial/main amd64 odbcinst amd64 2.3.1-4.1 [13.1 kB]
Get:6 http://sg.archive.ubuntu.com/ubuntu xenial/main amd64 unixodbc amd64 2.3.1-4.1 [20.5 kB]
Get:7 http://sg.archive.ubuntu.com/ubuntu xenial/main amd64 unixodbc-dev amd64 2.3.1-4.1 [217 kB]
Fetched 827 kB in 1s (515 kB/s)
Selecting previously unselected package libltdl-dev:amd64.
(Reading database … 233777 files and directories currently installed.)
Preparing to unpack …/libltdl-dev_2.4.6-0.1_amd64.deb …
Unpacking libltdl-dev:amd64 (2.4.6-0.1) …
Selecting previously unselected package libodbc1:amd64.
Preparing to unpack …/libodbc1_2.3.1-4.1_amd64.deb …
Unpacking libodbc1:amd64 (2.3.1-4.1) …
Selecting previously unselected package libtool.
Preparing to unpack …/libtool_2.4.6-0.1_all.deb …
Unpacking libtool (2.4.6-0.1) …
Selecting previously unselected package odbcinst1debian2:amd64.
Preparing to unpack …/odbcinst1debian2_2.3.1-4.1_amd64.deb …
Unpacking odbcinst1debian2:amd64 (2.3.1-4.1) …
Selecting previously unselected package odbcinst.
Preparing to unpack …/odbcinst_2.3.1-4.1_amd64.deb …
Unpacking odbcinst (2.3.1-4.1) …
Selecting previously unselected package unixodbc.
Preparing to unpack …/unixodbc_2.3.1-4.1_amd64.deb …
Unpacking unixodbc (2.3.1-4.1) …
Selecting previously unselected package unixodbc-dev.
Preparing to unpack …/unixodbc-dev_2.3.1-4.1_amd64.deb …
Unpacking unixodbc-dev (2.3.1-4.1) …
Processing triggers for libc-bin (2.23-0ubuntu10) …
Processing triggers for man-db (2.7.5-1) …
Setting up libltdl-dev:amd64 (2.4.6-0.1) …
Setting up libodbc1:amd64 (2.3.1-4.1) …
Setting up libtool (2.4.6-0.1) …
Setting up odbcinst1debian2:amd64 (2.3.1-4.1) …
Setting up odbcinst (2.3.1-4.1) …
Setting up unixodbc (2.3.1-4.1) …
Setting up unixodbc-dev (2.3.1-4.1) …
Processing triggers for libc-bin (2.23-0ubuntu10) …
check if all files are in their right folders
ubuntuadmin@uts1051:~/Downloads/mysql-connector-odbc-5.3.10-linux-ubuntu16.04-x86-64bit$ cd ..
ubuntuadmin@uts1051:~/Downloads$ cd /usr/local/lib/
ubuntuadmin@uts1051:/usr/local/lib$ ls
libmyodbc5a.so libmyodbc5S.so libmyodbc5w.so python2.7 python3.5
ubuntuadmin@uts1051:/usr/local/lib$ cd ..
ubuntuadmin@uts1051:/usr/local$ cd bin
ubuntuadmin@uts1051:/usr/local/bin$ ls
myodbc-installer
check if unixodbc is running
ubuntuadmin@uts1051:/usr/local/bin$ sudo systemctl status unixodbc
â—Ź unixodbc.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
unixodbc not running because we haven’t configure it, find odbcinst.ini file and configure it
ubuntuadmin@uts1051:/usr/local$ cd ~
ubuntuadmin@uts1051:~$ cd /etc/
ubuntuadmin@uts1051:/etc$ ls
acpi dictionaries-common issue ODBCDataSources services
adduser.conf dnsmasq.d issue.net odbc.ini sgml
alternatives doc-base kbd odbcinst.ini shadow
anacrontab dpkg kernel opt shadow-
apg.conf drirc kernel-img.conf os-release shells
apm emacs kerneloops.conf pam.conf signond.conf
apparmor environment ldap pam.d signon-ui
apparmor.d ethertypes ld.so.cache papersize skel
apport firefox ld.so.conf passwd s-nail.rc
appstream.conf firewalld ld.so.conf.d passwd- speech-dispatcher
apt fonts legal pcmcia ssh
aptdaemon fstab libao.conf perl ssl
at.deny fuse.conf libaudit.conf pki subgid
at-spi2 fwupd.conf libnl-3 pm subgid-
avahi gai.conf libpaper.d pnm2ppa.conf subuid
bash.bashrc gconf libreoffice polkit-1 subuid-
bash_completion gdb lightdm popularity-contest.conf sudoers
bash_completion.d ghostscript lintianrc ppp sudoers.d
bindresvport.blacklist gnome locale.alias printcap sysctl.conf
binfmt.d gnome-app-install locale.gen profile sysctl.d
bluetooth groff localtime profile.d systemd
brlapi.key group logcheck protocols terminfo
brltty group- login.defs pulse thermald
brltty.conf grub.d logrotate.conf python thunderbird
ca-certificates gshadow logrotate.d python2.7 timezone
ca-certificates.conf gshadow- lsb-release python3 tmpfiles.d
ca-certificates.conf.dpkg-old gss ltrace.conf python3.5 ucf.conf
calendar gtk-2.0 lvm rc0.d udev
chatscripts gtk-3.0 machine-id rc1.d udisks2
compizconfig guest-session magic rc2.d ufw
console-setup hdparm.conf magic.mime rc3.d updatedb.conf
cracklib host.conf mailcap rc4.d update-manager
cron.d hostname mailcap.order rc5.d update-motd.d
cron.daily hosts manpath.config rc6.d update-notifier
cron.hourly hosts.allow mime.types rc.local UPower
cron.monthly hosts.deny mke2fs.conf rcS.d upstart-xsessions
crontab hp modprobe.d resolvconf usb_modeswitch.conf
cron.weekly ifplugd modules resolv.conf usb_modeswitch.d
cups iftab modules-load.d rmt vim
cupshelpers ImageMagick-6 mtab rpc vtrgb
dbus-1 init mtools.conf rsyslog.conf wgetrc
dconf init.d mysql rsyslog.d wpa_supplicant
debconf.conf initramfs-tools nanorc sane.d X11
debian_version inputrc network securetty xdg
default insserv NetworkManager security xml
deluser.conf insserv.conf networks selinux zsh_command_not_found
depmod.d insserv.conf.d newt sensors3.conf
dhcp iproute2 nsswitch.conf sensors.d
configure odbcinst.ini file with gedit
ubuntuadmin@uts1051:/etc$ sudo gedit odbcinst.ini
(gedit:43545): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
** (gedit:43545): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-enabled not supported
** (gedit:43545): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported
** (gedit:43545): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported
configure odbcinst.ini using below information
ubuntuadmin@uts1051:/etc$ cat odbcinst.ini
[MySQL ODBC 5.3 Unicode Driver]
Driver = /usr/local/lib/libmyodbc5w.so
UsageCount = 1
check again if libmyodbc5w.so is inside /usr/local/lib/ folder
ubuntuadmin@uts1051:/etc$ cd /usr/local/lib
ubuntuadmin@uts1051:/usr/local/lib$ ls -la
total 26328
drwxr-xr-x 4 root root 4096 Feb 28 13:30 .
drwxr-xr-x 10 root root 4096 Aug 1 2017 ..
-rw-r–r– 1 root root 10687848 Feb 28 13:30 libmyodbc5a.so
-rw-r–r– 1 root root 5560920 Feb 28 13:30 libmyodbc5S.so
-rw-r–r– 1 root root 10687912 Feb 28 13:30 libmyodbc5w.so
drwxrwsr-x 4 root staff 4096 Feb 28 06:41 python2.7
drwxrwsr-x 3 root staff 4096 Aug 1 2017 python3.5
check if the configured driver show up in myodbc
ubuntuadmin@uts1051:/usr/local/lib$ myodbc-installer -d -l
ODBC Drivers
MySQL ODBC 5.3 Unicode Driver
ubuntuadmin@uts1051:/usr/local/lib$ cd ~
open up port 3306 for mysql connection in firewalld (to allow remote connection using port number 3306)
ubuntuadmin@uts1051:~$ sudo firewall-cmd –list-all
public (default, active)
interfaces: eth0
sources:
services: dhcpv6-client ssh
ports: 80/tcp 8850/tcp
protocols:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
ubuntuadmin@uts1051:~$ sudo firewall-cmd –permanent –add-port=3306/tcp
success
ubuntuadmin@uts1051:~$ sudo firewall-cmd –reload
success
ubuntuadmin@uts1051:~$ sudo firewall-cmd –list-all
public (default, active)
interfaces: eth0
sources:
services: dhcpv6-client ssh
ports: 80/tcp 3306/tcp 8850/tcp
protocols:
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
set the bind-address inside my.cnf file to the mysql server ip address
ubuntuadmin@uts1051:/etc$ cd mysql/
ubuntuadmin@uts1051:/etc/mysql$ ls
conf.d debian.cnf debian-start my.cnf my.cnf.fallback mysql.cnf mysql.conf.d
ubuntuadmin@uts1051:/etc/mysql$ cat my.cnf
#
The MySQL database server configuration file.
#
You can copy this to one of:
– “/etc/mysql/my.cnf” to set global options,
– “~/.my.cnf” to set user-specific options.
One can use all long options that the program supports.
Run program with –help to get a list of available options and with
–print-defaults to see which it would actually understand and use.
#
For explanations see
http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
* IMPORTANT: Additional settings that can override those from this file!
The files must end with ‘.cnf’, otherwise they’ll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
bind-address=10.40.50.66ubuntuadmin@uts1051:/etc/mysql$
Done. Now test it with Tableau Server. Enjoy today friends.
