Snow Leopard Server MySQL Service 和 MacPorts MySQL 安装问题
Posted
技术标签:
【中文标题】Snow Leopard Server MySQL Service 和 MacPorts MySQL 安装问题【英文标题】:Snow Leopard Server MySQL Service and MacPorts MySQL Install Troubles 【发布时间】:2012-04-26 17:44:30 【问题描述】:试图退出 macports mysql 安装并返回到 Snow Leopard Server 的内置 MySQL 服务器,但我无法让它工作。
当我禁用 macports 并启用内置服务时,找不到mysql.sock
(定位 mysql.sock 什么都不返回)。当我重新启用 macport mysql 时,找到了 mysql.sock 但现在我无法禁用内置的 MySQL 服务。
每次我尝试,它都会重新启用它。
我必须运行以下命令才能让 MacPorts MySQL 在重新启动时工作:
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
ln -s /var/mysql/mysql.sock /tmp/mysql.sock
/var/mysql 上的权限是(这是内置服务设置的位置):
drwxr-xr-x 111 _mysql _mysql
macports 数据目录的权限是:
drwxr-xr-x 116 _mysql _mysql
有一次,根据内置mysql的访问日志文件,它正确启动(2010)。有没有办法在我重新启动时手动禁用此服务启动?
我意识到我的问题有多不清楚,但不知何故,以前的管理员将 macports mysql 与内置 mysql 绑定在一起,我花了很长时间来解开它们。
【问题讨论】:
【参考方案1】:在/Library/LaunchDaemons/
plist
-已安装应用程序的文件中,这是我所拥有的:
$ ls -l /Library/LaunchDaemons/
-r--r--r-- 1 root wheel 573 Jan 10 18:33 at.obdev.littlesnitchd.plist
-rw-r--r-- 1 root wheel 567 Mar 5 19:02 com.parallels.desktop.launchdaemon.plist
lrwxr-xr-x 1 root admin 74 Jan 20 06:21 org.macports.mysql5.plist -> /opt/local/etc/LaunchDaemons/org.macports.mysql5/org.macports.mysql5.plist
lrwxr-xr-x 1 root admin 74 Oct 14 2011 org.macports.rsyncd.plist -> /opt/local/etc/LaunchDaemons/org.macports.rsyncd/org.macports.rsyncd.plist
如果您想查看 MacOS 捆绑服务的配置,请查看 /System/Library/LaunchDaemons/
。
【讨论】:
以上是关于Snow Leopard Server MySQL Service 和 MacPorts MySQL 安装问题的主要内容,如果未能解决你的问题,请参考以下文章
使用 rvm 在 Snow Leopard for Rails 3 上安装 mysql2 gem
如何让 RabbitMQ 在 Snow Leopard 64 位上运行?
Ruby:mysql2-Gem 不工作(Mac OS X Snow Leopard,Ruby 1.9.2)
在 Mac OS 10.6 (Snow Leopard)、10.7 (Lion)、10.8 (Mountain Lion) 上激活 PHP 和 MySQL 的最简单方法?