服务器管理下的MySQL服务是灰色的


0

我们刚刚安装了Mac OSX Server 10.6.7,但MySQL服务似乎不起作用,这很奇怪,因为它是一个全新的安装!

我打开服务器管理员,在服务下,MySQL服务有一个灰色圆圈。 AFP,FTP和Web都是绿色的。如果我在“设置”中取消选中“MySQL”框,它会在几秒钟内重新检查。点击LHS上的MySQL服务:

**The service has encountered an error.**
Try to refresh the view (workwork/MySQL). (NIL_RESPONSE_ERR (*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: startTime))) MySQL

(该弹出窗口出现两次,然后)

**The service "MySQL" is unreachable**
Try to reconnect to workwork (a back-end component may be missing).

我可以打开终端,运行 mysql,这会打开一个mysql提示符。我还尝试打开MySQL Workbench,在“服务器管理”下选择“新服务器实例”,选择localhost,获取默认值,然后获取:

**Could not connect to MySQL server:**
Lost connection to MySQL server at 'reading initial communication packet', system error: 61
You may continue if the server is simply not running.

再次,这是一个全新的安装,所以它非常奇怪。

Answers:


0

serverAdmin用于存储服务状态的plist缺少某些键。

看看/Library/Preferences/com.apple.MySQLService.plist

它应该看起来像:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>activeDBPath</key>
    <string>/var/mysql</string>
    <key>selectedDBPath</key>
    <string>/var/mysql</string>
    <key>serviceRunning</key>
    <true/>
    <key>serviceStart</key>
    <date>2011-07-27T14:24:23Z</date>
</dict>
</plist>

你的可能缺少serviceStart密钥

我之前已经发生过这种情况,但我不知道为什么。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.