- First, make sure you have homebrew installed
- Run
brew doctor
and address anything homebrew wants you to fix - Run
brew install mysql
- Run
brew services restart mysql
- Run
mysql.server start
- Run
mysql_secure_installation
- Grab the the appropriate windows installer and run it.
Use apt-get
or equivalent.
Once you've installed mysql, you can test your installation with a user of your choice (we'll use the root
user) by running
mysqlshow -uroot -p
Finally, you'll need to create a login config file with the database's master username and password. Replace root
with the master user account for your database if necessary
mysql_config_editor set --login-path=local --host=localhost --user=root --password
You should now be able to run
mysqlshow --login-path=local
without having to provide a password in the CLI.