Getting mysql-workbench to work on Debian 11

srp 09 2021

UPDATE: Some people have reached out to me that the guide does not work for them. I've decided to re-do the guide with a clean install of Debian 11 Bullseye (stable as of August 2021).

MySQL Workbench is currently unavailable on Debian 10 and 11. Ubuntu packages seem to be incompatible. The only two remaining options for installation are: getting a Snap package or building the Workbench from source. This blog post deals with the latter.

This blog post will guide you through the required steps to successfully build MySQL Workbench on Debian 11. Steps that need further explanation contain links to the appropriate section of this article.

  1. Grab the generic Linux source code at
  2. Extract the source code folder.
  3. Patch the source code using my MariaDB compatibility patch (GitHub repository link).
  4. Create your build directory inside the main directory and cd inside.
  5. Install required packages as described below.
  6. Get ANTLR as described below.
  7. Run cmake.
  8. Run make to build the project.
  9. Use the remaining steps in the INSTALL file for installation into your system.

Happy database designing!

Install required packages

The following packages are required for successful run of CMake. Get them using you favorite package manager:

build-essential cmake autoconf automake pkg-config libtool libzip-dev libxml2-dev libsigc++-2.0-dev libglade2-dev libglu1-mesa-dev libgl1-mesa-glx mesa-common-dev libmariadbd-dev libmysqlcppconn-dev uuid-dev libpixman-1-dev libpcre3-dev libpango1.0-dev libcairo2-dev python3-dev libboost-dev mariadb-client libsqlite3-dev swig libvsqlitepp-dev libgdal-dev libgtk-3-dev libgtkmm-3.0-dev libssl-dev libsecret-1-dev libproj-dev libssh-dev libcrypt-dev rapidjson-dev libantlr4-runtime-dev

Get ANTLR jar file

MySQL Workbench demands a very specific version 4.9.1 of libantlr4-runtime-java. Unfortunately this version is not yet available in Debian 11 by downloading the libantlr4-runtime-java package. We will use a complete ANTLR jar file instead. Download it manually from (direct link).  Add the following flag to your CMake command:


Don't forget to check that you have JAVA_HOME variable correctly set, otherwise the CMake command will fail to detect your java installation even if java command is in your path.

Run CMake

You can now run CMake from your build directory:

cmake -DWITH_ANTLR_JAR=/full/path/to/the/antlr-jar-file ..

CMake might complain about detected MySQL version being an empty string but this can be ignored. It does not prevent a successful build. Simply re-run CMake again.