官网下载的 mysql-5.7.10-osx10.10-x86_64.dmg 文件,安装好之后。 在.zshrc 中配置了环境变量。 输入这个命令 `➜ /Users/gang >mysql -u root -p password 123456` >mysql Ver 14.14 Distrib 5.7.10, for osx10.9 (x86_64) using EditLine wrapper Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
>Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
>Usage: mysql [OPTIONS] [database] ...
输入 `mysql -u root -p password 123` 也能也出来 >mysql Ver 14.14 Distrib 5.7.10, for osx10.9 (x86_64) using EditLine wrapper Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
执行 `mysqladmin -u root -p` >也是同样的
修改密码 `mysqladmin -u root -p password 123456` >Enter password: mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)