MAMP安装后没有 mysql 控制命令,软连接没权限等等

php教程评论354 views阅读模式

安装 MAMP 后再终端输入 mysql 提示

mysql
-bash: mysql: command not found

然后自己制作连接到/usr/bin,提示没权限

# sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin
ln: /usr/bin/mysql: Operation not permitted

想用 Sequel Pro 连接数据库,也是提示:

MySQL said: Access denied for user 'root'@'localhost' (using password: YES)

请问这些问题怎么解决呢?

回复内容:

安装 MAMP 后再终端输入 mysql 提示

mysql
-bash: mysql: command not found

然后自己制作连接到/usr/bin,提示没权限

# sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin
ln: /usr/bin/mysql: Operation not permitted

想用 Sequel Pro 连接数据库,也是提示:

MySQL said: Access denied for user 'root'@'localhost' (using password: YES)

请问这些问题怎么解决呢?

mysql
-bash: mysql: command not found
这个可能是环境变量的问题

第二个不知道,没玩过。

MySQL said: Access denied for user 'root'@'localhost' (using password: YES)
你这是密码错误的提示呢

如果你是mac,Operation not permitted的解决方法
是El Capitan 加入了Rootless机制,不再能够随心所欲的读写很多路径下了。设置 root 权限也不行。
要关闭Rootless
重启按住 Command+R,进入恢复模式,打开Terminal。

csrutil disable

再重启就可以
参考文章: http://www.jianshu.com/p/22b8...

企鹅博客
  • 本文由 发表于 2020年9月16日 11:00:34
  • 转载请务必保留本文链接:https://www.qieseo.com/234576.html

发表评论