好的,我已经遍地搜索,花了很多时间安装,卸载,尝试各种选项,但没有成功。
我在Mac OS X Lion(10.7.3)上,尝试设置Python,MySQL。
我通过HomeBrew成功安装了Python和MySQL。Python很棒。
安装完MySQL之后,我按照前两个步骤进行操作-unset和mysql_install_db命令。
mysql_install_db
现在,当我尝试启动mysql“ mysql.server start”时,出现以下错误
ERROR! The server quit without updating PID file (/usr/local/var/mysql/Brajeshwar.local.pid).
Brajeshwar
编辑2012/09/18: 正如凯恩(Kane)所指出的,请确保mysql在执行其他任何操作之前正确设置了数据库。请参阅“ mysql.server启动时PID错误?”以获取更多信息。
mysql
出于历史原因,保留了原始答案: 最有可能 是 权限问题。检查/usr/local/var/mysql/*.err。我的说:
/usr/local/var/mysql/*.err
120314 16:30:14 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name ./ibdata1 InnoDB: File operation call: 'open'. InnoDB: Cannot continue operation. 120314 16:30:14 mysqld_safe mysqld from pid file /usr/local/var/mysql/janmoesen.local.pid ended
我还必须这样做:
sudo chown _mysql /usr/local/var/mysql/*