
We've installed your MySQL database without a root password. Homebrew will always search for the latest version of a formula as of Nov 11, 2022, it's 8.0.31Īfter a few seconds, you should see a success and instructions message. bin/bash -c "$(curl -fsSL )" Step 2: Install the latest MySQL server. Visit to follow the step-by-step instructions, or copy and paste the following command into your terminal (iTerm 2 you just installed). Homebrew is a great package manager that makes it easy to install and uninstall software (especially for open-source tools)

Instead, we will install the powerful Homebrew tool to manage everything for your MySQL, like upgrade and database migration for the future version release. MySQL's official documentation recommends using the Native Package, which I found challenging to follow, especially for new Mac users, and I'd recommend using our method instead.

If you wish to change it though, you can use $ mysqladmin -u root password 'new-password'.Here is a step-by-step tutorial on installing and configuring MySQL on your Mac with Apple Silicon M1. It doesn't really matter for a local development database. Note: By default, the MySQL user root has no password. To connect with the command-line client, run: $ mysql -uroot You can see the different commands available for rver with: $ rver -help To stop it when you are done, run: $ rver stop To start the MySQL server, use the rver tool: $ rver start $ mysql_install_db -verbose -user=`whoami` -basedir="$(brew -prefix mysql)" -datadir=/usr/local/var/mysql -tmpdir=/tmp

To install, run: $ brew update # Always good to doĪs you can see in the ouput from Homebrew, before we can use MySQL we first need to set it up with: $ unset TMPDIR

We will install MySQL using Homebrew, which will also install some header files needed for MySQL bindings in different programming languages (MySQL-Python for one).
