Currently, MySQL Workbench has dark theme support for macOS and Linux only.
For Windows, there’s a workaround that enables the dark theme for MySQL Workbench.
This tutorial will help you enable the dark theme on MySQL Workbench for Windows, macOS, and Linux.
Enable MySQL Workbench dark theme on Windows
MySQL Workbench for Windows doesn’t support the dark theme yet until version 8.0.26
.
To enable the dark theme, you need to manually edit the XML file responsible for setting the colors in MySQL Workbench.
There’s a file called code_editor.xml
that stores the color theme for the Workbench code editor.
For Windows, it’s usually stored under your Workbench installation data/
folder:
C:\Program Files\MySQL\MySQL Workbench X.X\data\code_editor.xml
Instead of having to figure out the right XML tags to change, you can use the dark theme created by mleandrojr to change your MySQL theme:
https://github.com/mleandrojr/mysql-workbench-dark-theme
Just replace the code_editor.xml
file in your computer with the one from the repository above.
Remember to back up your original code_editor.xml
file before replacing it.
Once done, you need to restart MySQL Workbench to see the changes:
As you can see, only the code editor has a dark theme, while the rest of the application still has a light theme.
MySQL Workbench may support the dark theme for Windows in the future, but for now, this is the best workaround I can find.
Enable MySQL Workbench dark theme on macOS
MySQL Workbench already has a dark theme for macOS, but it follows the theme set by macOS and you can’t enable it manually from MySQL Workbench settings.
To enable the dark theme on MySQL Workbench for macOS, you need to enable the dark appearance from macOS System Preferences.
Head to the System Preferences -> General -> Appearance
window and select the Dark
appearance option as follows:
Now when you open MySQL Workbench, the entire application will have a dark appearance:
And that’s how to enable the dark theme for MySQL Workbench on macOS.
To disable the dark theme, you need to select the Light
option for macOS appearance.
Enable MySQL Workbench dark theme on Linux Ubuntu
To enable the dark theme on MySQL Workbench for Ubuntu, you need to turn on the dark appearance option on Ubuntu and also modify the code_editor.xml
file directly.
First, head to the Settings -> Appearance
tab in Ubuntu and select the Dark
option as shown below:
Then if you open MySQL Workbench, you’ll see the application interface has turned dark but not the SQL editor:
To get a full dark theme on MySQL Workbench, you also need to modify the code_editor.xml
file which is responsible for setting the editor color.
In Linux distributions, you’ll most likely find the code_editor.xml
file in the following location:
/usr/share/mysql-workbench/data/code_editor.xml
Once you get into the data/
directory, create a backup of the code_editor.xml
file:
sudo cp code_editor.xml code_editor.xml.bak
Then, you can replace the code_editor.xml
file with this one from mleandrojr.
Now you’ll see a full dark mode on MySQL Workbench for Linux as follows:
And that’s how you turn the dark mode on a Linux-based OS.
Now the dark theme should reduce the strain on your eyes as you edit your SQL files. 👍