Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Installing MySQL on OS X

Last modified: Oct 12, 2023 5:24 AM
31 70586 Last modified Oct 12, 2023 5:24 AM

This User Tip describes how to download, install, and setup MySQL for use on macOS. Please read through the entire User Tip before starting.


Requirements:

  • Basic understanding of Terminal.app and how to run command-line programs.


Download the current version of MySQL from the Community Server. If you have a new Apple Silicon M1 or M2 computer, download the ARM DMG Archive. Otherwise, download the older x86 version. At the time of writing this User Tip, the current version is 8.1.0. By the time you read this, there may be a newer version to use instead. Go to the mysql-8.1.0-macos13-arm64 volumes and double-click the mysql-8.1.0-macos13-arm64.pkg file to install.


MySQL is now up and running. You can control the server from the newly installed Settings pane in System Settings > MySQL.


If you want to run MySQL from the command line, you will need to setup the following aliases:

alias mysql=/usr/local/mysql/bin/mysql

alias mysqladmin=/usr/local/mysql/bin/mysqladmin


You can add these to your .zshrc file or add /usr/local/mysql/bin to your PATH.


Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.