Logo Vincent
Back to all posts

Installing MySQL on Mac

Tools
Installing MySQL on Mac

Introduction

This article covers how to install MySQL on Mac.

Steps

Download

Go to the MySQL official website to download the DMG installer.

Download link: https://dev.mysql.com/downloads/mysql/

Select the DMG version for download,

Install

After downloading, double-click the DMG file to install,

Keep clicking next until the installation is complete,

During the process, you’ll be asked to set a password — remember this password,

Configure Environment Variables

After installation, you need to configure the environment variables,

vim ~/.bash_profile

Add the following content,

export PATH=$PATH:/usr/local/mysql/bin

Then apply the changes,

source ~/.bash_profile

Verify

After configuration, you can verify by running the following command,

mysql -u root -p

Enter the password you set during installation to log in to MySQL,

© 2026 Vincent. All rights reserved.