DEV Community

Recca Tsai
Recca Tsai

Posted on • Originally published at recca0120.github.io

Fix the Missing mysql Command After Installing DBngin

Originally published at recca0120.github.io

DBngin lets you run multiple versions of MySQL, PostgreSQL, and Redis simultaneously. However, since it supports multiple versions, it doesn't automatically add the mysql executable to your PATH. Running mysql directly in the terminal will result in a "command not found" error.

Add the Latest MySQL Version to PATH

Add the following to ~/.bashrc to automatically pick up the latest MySQL version's path:

echo 'export PATH=`printf "%s"$'\''\n'\'' /Users/Shared/DBngin/mysql/* | sort -Vr | head -n1`/bin:$PATH' >> ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

After reopening the terminal, you can use the mysql command directly.

Top comments (0)