How to Install and Uninstall MySQL with Brew
Robert Cooper
Robert Cooper Senior Engineer at Basedash
· January 31, 2025
Robert Cooper
Robert Cooper Senior Engineer at Basedash
· January 31, 2025
Brew, a popular package manager for macOS, simplifies the process of installing and managing software like MySQL, a widely-used open-source relational database management system. This guide covers the installation and uninstallation of MySQL using Brew, including the MySQL client and Workbench, in a terminal environment.
If Homebrew is not already installed, open the terminal and run:
/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"
To install MySQL using Brew:
brew install mysql
Start the MySQL service:
brew services start mysql
Run the security script to secure your MySQL installation:
mysql_secure_installation
For a GUI interface, install MySQL Workbench:
brew install --cask mysqlworkbench
Before uninstalling, stop the MySQL service:
brew services stop mysql
To remove MySQL:
brew uninstall mysql
To completely remove MySQL data:
rm -rf /usr/local/var/mysql
If MySQL Workbench was installed, uninstall it:
brew uninstall --cask mysqlworkbench
Using Homebrew to manage MySQL on macOS offers a streamlined approach for installation, configuration, and uninstallation. This guide should provide engineers with a clear and concise method for handling MySQL on their systems.
Written by
Senior Engineer at Basedash
Robert Cooper is a senior engineer at Basedash who builds full-stack product systems across SQL data infrastructure, APIs, and frontend architecture. His work focuses on application performance, developer velocity, and reliable self-hosted workflows that make data operations easier for teams at scale.
Basedash lets you build charts, dashboards, and reports in seconds using all your data.