Use Homebrew
brew install mysql brew info mysql
After install MySQL, Need to run MySQL program.
brew services start mysql
If there are error or any problem, you cannot connect.
mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
When install mysql for the first time, the root password is empty. After setting the password, connecting to mysql, you must enter the password to connect.
mysql -u root -p