How to Install MySQL on Mac
Robert Cooper
Robert Cooper Senior Engineer at Basedash
· January 31, 2025
Robert Cooper
Robert Cooper Senior Engineer at Basedash
· January 31, 2025
This guide walks you through how to install MySQL on a macOS system using either the DMG archive and the Compressed TAR archive.
You can download the MySQL Community Server for macOS from the official MySQL website.
URL: https://dev.mysql.com/downloads/mysql/
.pkg file). Double-click on it to initiate the installation process.If you opted to download the TAR archive:
Navigate to the directory where the TAR file was downloaded.
Extract the TAR archive using:
Replace xxxxx with the actual file name.
tar -xzf mysql-xxxxx.tar.gz
Navigate into the extracted directory:
cd mysql-xxxxx
Install MySQL by following the provided instructions, typically found in a README or INSTALL file.
Once you’ve installed MySQL using either method, you can start the MySQL server using the following command:
sudo /usr/local/mysql/support-files/mysql.server start
Enter your Mac’s administrative password when prompted.
Alternatively, if you installed the Preference Pane using the DMG method, you can navigate to System Preferences > MySQL and start/stop the server from there.
It’s crucial to run the mysql_secure_installation script to enhance the security of your MySQL installation:
/usr/local/mysql/bin/mysql_secure_installation
You’ll be guided through a series of prompts to:
You can connect to the MySQL server using the command-line client with:
/usr/local/mysql/bin/mysql -u root -p
When prompted, enter the root password you set during the secure installation process.
Basedash is built as an AI-native BI platform, so teams can go from ad hoc SQL to trusted answers and dashboards quickly, without the overhead of traditional BI setup.
You’ve successfully installed MySQL on your Mac using either the DMG archive or the Compressed TAR archive! For more detailed configurations and troubleshooting, refer to the official MySQL documentation. Remember to periodically check for updates and patches to ensure you’re running a secure and efficient MySQL server.
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.