Install MySQL in MacOS

Profile picture for user devraj

MySQL has different version. In this article we will be installing the community edition of MySQL

Table of Contents

Download MySQL Community Edition

To install MySQL on MacOS follow below steps:

Step 1: Navigate to MySQL Website

Step 2: Click on Downloads in top menu

Download MySQL for MacOS

Step 3: Scroll down and click on MYSQL Community (GPL) Downloads

Download MySQL Community Edition on MacOSStep 4: Click on MySQL Community Server

MySQL Community Server

Step 5: Select Following values:

  • Select Version:  LTS
  • Select Operating System: macOS 
  • Select OS Version: x64 or ARM
Install MySQL Community Server in MacOS

Step 6: After above selection, macOS (...) DMG Archive will display. Click on Download 

Install MySQL DMG file on MacOS

Step 7: It will ask you to Login. It is up to you if you want to login, you can see benefits written on same page. With login download will be faster and there are few more benefits. If you are not interested to login click on No thanks, just start my download.

Install MySQL Community Edition without login

Install MySQL Community Edition

Step 1: Once the download is finished. Open downloaded DMG file to start installation

Step 2: Double click on .pkg file

install mysql on mac os

Step 3: Click on Allow

Click on allow for mysql package installation

Step 4: Click on Continue

Install mysql community edition

Step 5: Scroll to accept License agreement and click on Continue. You will see popup to agree the terms. Click on Agree

mysql community edition licence agreement

Step 6: Click on Install

Install mysql community edition on MacOS

Enter system password if it asks.

Step 7: On the Configuration screen. Enter root password and click on Finish. Root password you will be using to login to mysql server later, remember it or save it somewhere.

Install MySQL in MacOS

Step 8: Enter System password

Install Remote Plugin for MySQL Community Edition

Step 9: Click finish. MySQL server is installed successfully.

Start MySQL Server

Once the mysql server is installed. It will automatically start, if you have selected the Start MySQL server... checkbox earlier. To stop or restart you can follow below steps: 

Step 1: Click on Apple icon and then System Settings...

Start Stop MySQL Server on MacOS

Step 2: Scroll up in Left Panel below Search, and click on MySQL.

MySQL Server Start Stop Mac OS

Step 3: Click on Stop MySQL Server or Start MySQL Server. It will ask for you system password.

Verify MySQL Server Installation

To verify MySQL is successfully installed, follow below steps:

Step 1: Open Terminal and type below command to check mysql version

mysql --version

Step 2: To login to MySQL Server follow below steps:

mysql -u root -p

You will see below screen:

verify mysql is installed on macos
Tags