Install from homebrew
brew install percona-serversudo chown -R <username> /usr/localunset TMPDIR
mysqld --initialize --datadir=/usr/local/var/mysql --user=<username>mysql.server startmysql will create temporary password for you and show it in the output of mysql.server start.
To change it
mysqladmin -u root -p'<temp_password>' password '<new_password>'To check whether it is working
mysql -u root -p
<Type in password>