macos, mysql,

Install MySQL on macOS with Homebrew

Oct 06, 2022 · 1 min read · Post a comment

If you strive to install MySQL on macOS in a few steps then brew is the right choice for it. Let’s see how to install MySQL on macOS with Homebrew.

Prerequisites

  • macOS
  • Homebrew
  • sudo privileges

Install MySQL on macOS

Step 1. Update the packages.

brew update

Step 2. Install MySQL.

brew install mysql

Step 3. Verify the installation.

mysql --version

Output:

mysql  Ver 8.0.30 for macos12.6 on arm64 (Homebrew)

Step 4. To secure MySQL, run:

mysql_secure_installation

Step 5. To start the MySQL service, run:

mysql.server start

Step 6. To stop the MySQL service, run:

mysql.server stop

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.