First, MySQL5.7.13 installation
to MySQL official online http://dev.mysql.com/downloads/mysql/, download MySQL can install the DMG version
mysql-5.7.13-osx10.11-x86_64. DMG
The downloaded files are: mysql-5.7.13-osx10.11-x86_64. dmg
Click on the installation package step-by-Step installation on the line.
System Preferences in the other, click on the "MySQL" icon
Click the start MySQL server button to start MySQL
Second, open the terminal, the definition of MySQL alias
Enter the alias command
alias Mysql=/usr/local/mysql/bin/mysql
carriage return, in the input
alias Mysqladmin=/usr/local/mysql/bin/mysqladmin
Third, set the MySQL root account password
(Note that the initial password system after installation will generate a random password, the way to notify the balloon)
mysqladmin-u root Password initial password
//If the setup is complete, you need to modify it, execute the command
mysqladmin-u root-p Password New password
then prompts for the password, enter the old password at this time, carriage return
Four, the connection database
mysql-u root-p
then prompt for the password and enter the password you just set
If you are logged on to a MySQL database on a remote host
Mysql-h host Address-u user name-P user Password
And then there's a long absence of mysql>.
Done.
The above is the Mac OS environment MySQL 5.7.13 installation tutorials, I hope to help you learn.