(homebrew.mxcl.mysql [2274]):服务无法初始化:无法设置当前工作目录. error = 2:没有这样的文件或目录
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了(homebrew.mxcl.mysql [2274]):服务无法初始化:无法设置当前工作目录. error = 2:没有这样的文件或目录,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1370字,纯文字阅读大概需要2分钟。
内容图文
![(homebrew.mxcl.mysql [2274]):服务无法初始化:无法设置当前工作目录. error = 2:没有这样的文件或目录](/upload/InfoBanner/zyjiaocheng/895/e4f1968cab004c3c9b423c74b9a6c526.jpg)
如果我在我的mac上运行控制台并转到system.log,我看到该系统,日志充满了这个错误
Oct 31 15:57:59 abhisheks-mbp com.apple.xpc.launchd[1] (homebrew.mxcl.mysql[2185]): Service could not initialize: Unable to set current working directory. error = 2: No such file or directory, path = /usr/local/var/mysql: 17A405: xpcproxy + 11040 [1403][43FABD4F-8081-3087-91BC-95B588688D55]: 0x2
Oct 31 15:57:59 abhisheks-mbp com.apple.xpc.launchd[1] (homebrew.mxcl.mysql): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Oct 31 15:58:03 abhisheks-mbp com.apple.xpc.launchd[1] (com.apple.preference.displays.MirrorDisplays): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
几个月前我用homebrew安装了mysql.但我已经删除它我不知道为什么它仍然试图运行它.
我试图删除mysql
~ > brew uninstall mysql
Error: No such keg: /usr/local/Cellar/mysql
但我仍然看到消息涌入.
解决方法:
您可能在过去使用brew服务启动mysql启用MySQL启动代理并忘记禁用brew服务(在卸载mysql之前),这将删除plist.
因此,使用以下方法手动卸载并从launchd数据库中删除代理:
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl remove ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
然后删除文件:
rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
如果您执行了plist的自定义安装,则homebrew.mxcl.mysql.plist文件可能位于/ Library / LaunchAgents中.然后使用相同的命令,但调整上面的路径并添加sudo.
内容总结
以上是互联网集市为您收集整理的(homebrew.mxcl.mysql [2274]):服务无法初始化:无法设置当前工作目录. error = 2:没有这样的文件或目录全部内容,希望文章能够帮你解决(homebrew.mxcl.mysql [2274]):服务无法初始化:无法设置当前工作目录. error = 2:没有这样的文件或目录所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。