其实是因为osx升级到Yosemite之后引起的开机不自动启动
解决方法:1.手动启动
sudo -s /usr/local/mysql/bin/mysqld_safe --user=mysql &
2.
创建一个新文件:/Library/LaunchDaemons/com.mysql.mysql.plist
KeepAlive
Label
com.mysql.mysqld
ProgramArguments
/usr/local/mysql/bin/mysqld_safe
--user=mysql
2.1更新权限并添加到 launchctl
sudo chown root:wheel /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist
sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
这是由于 Yosemite 废弃了 StartupItems 导致的
阅读(1043) | 评论(0) | 转发(0) |