OS version: Mac OSX 10.11
MySQL version: Download dmg v5.6.33 https://www.mysql.com/
Installation steps
1. Double-click the DMG installation
2. Turn on MySQL service
System Preferences-bottom-mysql-open service
The MySQL command cannot be used at this time, and the path to the MySQL command needs to be configured.
3. Configure the path of the environment variable MySQL
Edit the. bash_profile file in the current user root directory and add a line:
Export Path=${path}:/usr/local/mysql/bin
Note:/usr/local/mysql is a link file that points to/usr/local/mysql-xxxxx, which can be seen through the ls-n command.
This time only the root user, the password is empty, and any user can log on, but there is no permissions.
To modify the root user's password: mysqladmin-u root-p password New_password
4. Remove any user login issues
Log in with Root:
Mysql-u root-p
To view a list of users:
Select User from Mysql.user;
You can see the users with several empty usernames, then we delete them:
Delete from user where user= ';
Then update the database and let the operation take effect:
Flush privileges;
OK, now it's time to start your MySQL trip.
This article is from the "focus_000" blog, make sure to keep this source http://120806872.blog.51cto.com/8289253/1855009
Install MySQL under Mac OSX