Installing MySQL on macOS

The official MySQL installer is the straightforward option when you want a local server on macOS and do not need a package manager. This is the process for the disk-image installer available when this article was written.

Installation

  1. Go to the MySQL website and download the disk image (.dmg).
  2. Double-click the file to mount the disk image and see its contents.
  3. Double-click the MySQL installer package from the disk. It is named according to the version of MySQL you have downloaded.
  4. The initial wizard introduction screen references the MySQL server version to install. Click Continue to begin the installation.
  5. On the Installation Type page, use the defaults or click Customize to choose between MySQL Server, the preference pane, and launchd support. All three are enabled by default.
  6. Click Install to begin the installation process.
  7. Enter your password and click Install Software.
  8. Wait while the files copy to your Mac.
  9. Confirm that the Summary page reports a successful installation.

The server is installed but may not be running yet. You can start it with launchctl or use the MySQL preference pane.

Launch MySQL server

  1. Open System Preferences.
  2. Select MySQL.
  3. Use Start MySQL Server to start it. The same control stops it later.
  4. Click the Configuration tab to set advanced options.
  5. Click Apply.

The preference-pane location may differ on newer macOS versions, which replaced System Preferences with System Settings. The installer and screen labels here describe the 2020 version.