MysqlWorkbench for ClearLinux

Hello guys, I just installed clearLinux I’m loving the experience. I wonder if there is any way to install MysqlWorkbench in this distro?

hugs !!!

1 Like

It looks like building from source is an option:
https://dev.mysql.com/doc/workbench/en/wb-installing-linux.html

They used to have a generic tar download option, but that seems to have disappeared.

1 Like

have you find a way to install it? Can you please help me too?

Could you help or give any direction us how to build from source code?

I have started a hybrid approach on my Clear Linux machine, running Arch Linux binaries alongside Clear Linux. This began for me since Clear Linux removed OpenMP support in LLVM (cannot build with -fopenmp argument). So, I’m using clang/clang++ from Arch Linux. This allows me to continue exploring OpenMP using LLVM.

Likewise, I tried installing MySQL Workbench using the same technique with success. If folks are interested, I can post the installation steps here. The Arch Linux binaries are installed in /opt/3rd-party-arch/. No changes are made to Clear Linux. A wrapper script, placed in your $HOME/bin folder, is needed to launch MySQL Workbench (setting few environment variables).

2 Likes

if you share installation steps, that would be great, thanks!

Disclaimer: This is an unofficial and unsupported MySQL-Workbench installation on Clear Linux in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Moreover, “A connection to a MariaDB database can be established but some MySQL Workbench features may not work properly since the database is not fully compatible with the supported versions of MySQL 5.6, 5.7 and 8.0.”

The following are the steps that I tried using packages from Arch Linux.

Install minimum requirements

sudo swupd bundle-add c-basic rsync wget

Fetch MySQL-Workbench packages

I do not plan on keeping the package list up to date. Therefore, validate the package versions and update your copy accordingly. Last checked on January 30, 2024.

sudo mkdir -p /opt/mysql-workbench/pkgs
sudo chown -R $USER:$USER /opt/mysql-workbench

c_url="https://ftp5.gwdg.de/pub/linux/archlinux/core/os/x86_64"
e_url="https://ftp5.gwdg.de/pub/linux/archlinux/extra/os/x86_64"

cd /opt/mysql-workbench/pkgs
wget "${c_url}/curl-8.5.0-1-x86_64.pkg.tar.zst"
wget "${c_url}/libffi-3.4.4-1-x86_64.pkg.tar.zst"
wget "${c_url}/pcre-8.45-4-x86_64.pkg.tar.zst"
wget "${c_url}/python-3.11.6-1-x86_64.pkg.tar.zst"
wget "${c_url}/sqlite-3.45.0-1-x86_64.pkg.tar.zst"
wget "${c_url}/unixodbc-2.3.12-1-x86_64.pkg.tar.zst"
wget "${e_url}/antlr4-runtime-4.13.1-1-x86_64.pkg.tar.zst"
wget "${e_url}/libjpeg-turbo-3.0.2-2-x86_64.pkg.tar.zst"
wget "${e_url}/mysql-workbench-8.0.36-1-x86_64.pkg.tar.zst"
wget "${e_url}/proj-9.3.1-1-x86_64.pkg.tar.zst"

Extract and install packages

cd /opt/mysql-workbench/pkgs
for p in $(ls *.tar.zst); do
  echo "extracting $p"
  tar xpf "$p" --force-local
  rm -fr .BUILDINFO .CHANGELOG .MTREE .PKGINFO
done

[ -d ./etc ] && rsync -aH ./etc/ /opt/mysql-workbench/etc/
[ -d ./usr ] && rsync -aH ./usr/ /opt/mysql-workbench/usr/
rm -rf ./etc ./usr

Create a wrapper script in your HOME bin folder

mkdir -p "${HOME}/bin"

tee "${HOME}/bin/mysql-workbench" >/dev/null <<'EOF'
#!/bin/bash
export WB_DEST_DIR=/opt/mysql-workbench
export FONTCONFIG_PATH=/usr/share/defaults/fonts
export XDG_DATA_DIRS=${WB_DEST_DIR}/usr/share:/usr/share
export LD_LIBRARY_PATH=${WB_DEST_DIR}/usr/lib
export PATH=${WB_DEST_DIR}/usr/bin:$PATH
export PROJSO=${WB_DEST_DIR}/usr/lib/libproj.so
export PYTHON_HOME=${WB_DEST_DIR}/usr
exec ${WB_DEST_DIR}/usr/bin/mysql-workbench "$@" &>/dev/null &
EOF

chmod 755 "${HOME}/bin/mysql-workbench"

Create a desktop file for launching MySQL-Workbench

tee "${HOME}/.local/share/applications/mysql-workbench.desktop" >/dev/null <<'EOF'
[Desktop Entry]
Name=MySQL Workbench
Comment=MySQL Database Design, Administration and Development Tool
Exec=/bin/bash -c "exec $HOME/bin/mysql-workbench %f"
Terminal=false
Type=Application
Icon=/opt/mysql-workbench/usr/share/icons/hicolor/128x128/apps/mysql-workbench.png
MimeType=application/vnd.mysql-workbench-model;application/sql;
Categories=GTK;Database;Development;
StartupWMClass=mysql-workbench-bin
EOF

I installed MariaDB locally, connected to it and created the testdb database.

This is all the time I have for this mini-project and captured the instructions. At pkgs.org, the Arch Linux mysql-workbench package has C++ development libraries as dependencies { json-c, rapidjson and vsqlite++ }, which I did not install. Instead, I tried the minimal approach checking for missing dependencies via ldd on binaries and libraries.

Well, this is an example of a hybrid-installation. It is not a container or a VM. Rather, it makes use of the system libraries (i.e. libgl, freetype2, pcre, et cetera).

There is not yet macOS-like Homebrew (Missing Package Manager) on Clear Linux.

1 Like