我有一个在 Amazon Linux AMI 上运行的亚马逊 ec2 实例及其一个微型实例。我想将 Django 安装到我的服务器上,所以我输入了这些命令
wget http://www.mlsite.net/blog/wp-content/uploads/2008/11/go
wget http://www.mlsite.net/blog/wp-content/uploads/2008/11/django.conf
chmod 744 go
./go
所以在我完成后,我跑sudo service httpd restart
了sudo service mysqld restart
这就是 mysqld 的结果:
Stopping mysqld: [ OK ]
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
所以我删除了 django 文件/usr/local/python2.6.8/site-packages/django_registration.egg
并尝试查找错误,我发现在我
/etc/my.cnf
的套接字中,它说
[mysqld]
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
datadir=/mnt/ebs/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqld]
default-storage-engine=INNODB
[mysqld]
default-storage-engine=INNODB
[mysqld]
default-storage-engine=INNODB
[mysqld]
default-storage-engine=INNODB
所以我去了/var/lock/subsys/
,没有mysql.sock
。我尝试使用 vim 创建一个,但它仍然无法正常工作。然后我检查了错误日志,它说
120712 20:33:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
120712 20:33:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
更新:
我输入了这些命令:
cd /var/lib/mysql/
touch mysql.sock
chmod +x mysql.sock
chown mysql:mysql -R *
而且还是不行……
所以我现在几乎迷路了。我知道这有关系mysql.sock
如果您可能知道造成这种情况的原因,请告诉我吗?我的服务器上有一个 wordpress 网站,所以我需要 MySQL 才能工作。谢谢!