官网下载的 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)
刚安装的,不默认没有密码么?
baidu,google 都解决不了。
求解决,感谢🙏
1
cassia 2016-01-01 19:48:22 +08:00
按照步骤一步一步来喽,今天新机刚做开发环境,和 mariadb 差不多,给你参考下 https://goo.gl/PX8bhc
|
2
julyclyde 2016-01-05 13:34:24 +08:00
你所谓的“能出来”是指能出来 mysql 的提示符还是 usage 啊?
我觉得你都没启动 mysql 后台服务 |