美文网首页
终端mysql Operation not permitted错

终端mysql Operation not permitted错

作者: 老马的春天 | 来源:发表于2016-12-21 09:57 被阅读468次

前言

前段时间装mysql,就遇到了ln: /usr/bin/mysql: Operation not permitted的错误,网上好多方法都过时了,下边是我的解决方法

原因

这是因为苹果在OS X 10.11中引入的SIP特性使得即使加了sudo(也就是具有root权限)也无法修改系统级的目录,其中就包括了/usr/bin。要解决这个问题有两种做法:一种是比较不安全的就是关闭SIP,也就是rootless特性;另一种是将本要链接到/usr/bin下的改链接到/usr/local/bin下就好了。

解决方法

sudo ln -s /usr/local/mysql/bin/mysql /usr/local/bin

相关文章

网友评论

      本文标题:终端mysql Operation not permitted错

      本文链接:https://www.haomeiwen.com/subject/iifqvttx.html