gpt4 book ai didi

MySQL 不工作

转载 作者:可可西里 更新时间:2023-11-01 08:51:47 25 4
gpt4 key购买 nike

<分区>

我有一个在 Amazon Linux AMI 上运行的 Amazon 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 restartsudo 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 才能工作。谢谢!

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com