The Oracle MySQL Community website is the best place to download the MySQL installer for Mac. Select previous versions of MySQL and check the OS version in the DMG download.
Click through each prompt from the installer. Important it will ask you for a password for the
root user of the database. You must note this password down in order to make the initial connection.
At this point, the MySQL 8 server should be running locally on your machine. It will only be running if you left the box checked to do so during Configuration in the Installer. Now, let's connect to it!
This is a screenshot from Arctype but you can use any SQL client to connect to your local MySQL database. Key items:
Now that you have connected, you should make a few changes to improve the security of your database. The first is to create a new database that is separate from the mysql informational database you are currently connected to.
CREATE DATABASE mynewdatabase
Next you should create a new user.
CREATE USER 'me'@'localhost' IDENTIFIED BY 'mypassword'
Lastly you will need to grant this user full permissions on the database you just created.
GRANT ALL PRIVILEGES ON mynewdatabase. * TO 'me'@'localhost'
Apply these permissions:
Good job! A new user and database has been created. Go back to the settings menu in your SQL client and switch to this user and database. You're ready to start writing queries!