Magento显示“处理您的请求时出错”
尝试命令“ sudo service mysqld restart”但无法启动时
然后,查看向我显示“ SQLSTATE [HY000] [2002]没有这样的文件或目录”的日志
我在Google,stackoverflow,magento stackoverflow网站上进行了很少的搜索,最后发现了一些问题
命令“ mysqld -u root -p status”之后
显示'mysqladmin:连接到'localhost'的服务器失败
错误:“无法通过套接字'/var/lib/mysql/mysql.sock'(2)连接到本地MySQL服务器”
检查mysqld是否正在运行以及套接字:'/var/lib/mysql/mysql.sock'是否存在!
我发现在/ var / lib / mysql /中没有mysql.sock,所以现在我该怎么办。我不只是新手。不幸的是,我向ec2实例中的所有目录授予了777权限,在此问题一段时间后,我看到我的网站“处理您的请求时出错。出于ec2的安全原因,我无法使用ftp或ssh访问实例。必须要做的是创建新实例,然后将此EBS赋予新实例,更改权限后,我便可以访问我的实例
请查看我的my.cnf文件。我看到有什么可以帮助的
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
这是mysqld.log
/usr/libexec/mysql55/mysqld: Can't create/write to file '/tmp/ibmCz4dv' (Errcode: 13)
160212 18:29:37 InnoDB: Error: unable to create temporary file; errno: 13
160212 18:29:37 [ERROR] Plugin 'InnoDB' init function returned error.
160212 18:29:37 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160212 18:29:37 [ERROR] Unknown/unsupported storage engine: InnoDB
160212 18:29:37 [ERROR] Aborting
160212 18:29:37 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete
160212 18:29:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
775到/ tmp和现在的mysqld.log
775到/ tmp和mysqld.log
/usr/libexec/mysql55/mysqld: Can't create/write to file '/tmp/ibLzshr1' (Errcode: 13)
160213 9:08:59 InnoDB: Error: unable to create temporary file; errno: 13
160213 9:08:59 [ERROR] Plugin 'InnoDB' init function returned error.
160213 9:08:59 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160213 9:08:59 [ERROR] Unknown/unsupported storage engine: InnoDB
160213 9:08:59 [ERROR] Aborting
160213 9:08:59 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete
160213 09:08:59 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
请帮我整理一下
最佳答案
mysql用户显然无权按照以下说明在/ tmp中创建文件
/usr/libexec/mysql55/mysqld: Can't create/write to file '/tmp/ibmCz4dv' (Errcode: 13)
检查/ tmp上的访问权限,应为
777
。 BTW sys“ errno 13”是“权限被拒绝”据此,服务器将停止并且不创建任何套接字,从而导致连接错误。
关于mysql - 无法通过套接字'/var/lib/mysql/mysql.sock'(2)连接到本地MySQL服务器。 mysql.sock在/var/lib/mysql/中不存在,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35365976/