As a result of the replacement of Mac computer, need to install a MySQL, through a variety of information, all kinds of stepping pits, finally finished, record, convenient for you to refer to:
1. Download the latest MySQL installation package: http://dev.mysql.com/downloads/mysql/
2. After the download is a DMG file, double-click the DMG file to display several sub-files, click Run mysql-5.7.14-osx10.11-x86_64.dmg will install MYSQ to/usr/local/ The mysql-5.7.14-osx10.11-x86_64. All the way to the default installation is complete, remember the last jump out of the temporary password (the password login once will expire, need to modify, remember!!!) ).
3. Click Install 2nd file mysqlstartupitem.pkg, so that MySQL will automatically start automatically when the boot.
4. After the installation, enter the/usr/local/mysql-5.7.14-osx10.11-x86_64/bin directory, run./mysql-u root-p, enter the temporary password just recorded after entering MySQL, no matter what input, will prompt:
ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.
Here must use the SQL statement to change the password, after a lot of data query, just enter the correct (red color is the new password):
5. To this, you can use the MySQL graphical tool to connect, I use Navicat Premium, the tool lightweight and convenient, suitable for a variety of databases, recommended everyone use!
Install MySQL tutorial under Mac