/1 "Mac system local MySQL comes with the environment
A. The MySQL command could not be found at first because the MySQL soft connection
Default installation directory/usr/local
MySQL (purple) is a shortcut to mysql-5.7.18-macos10.12-x86_64
Create soft Connect ln-s mysql-5.7.18-macos10.12-x86_64 MySQL (:-S software soft)
Remove soft connection rm-rf MySQL ( delete all files in current directory )
Soft Links:
1. Soft links, in the form of a path exists. Similar to shortcuts in the Windows operating system
2. Soft links can cross file system, hard links can not
3. Soft links can link to a nonexistent file name
4. Soft links can be linked to the directory
Hard Links:
1. Hard link, in the form of a copy of the file. But does not occupy the actual space.
2. Do not allow the creation of hard links to the directory
3. Hard links can only be created in the same file system
2. Turn off MySQL on the MAC system itself
If you report this mistake,
$mysql-U root-p
Enter Password:
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2)
Just didn't turn on MySQL.
2 "
Dual MySQL environment under MAC Environment Unified and CentOS under MySQL forgot password processing