Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

出现Database error: SQLSTATE[HY000] [2002] No such file or directory时应该怎么做 #6

Open
LouisLuFin opened this issue Apr 15, 2019 · 2 comments

Comments

@LouisLuFin
Copy link

LouisLuFin commented Apr 15, 2019

我是小白,在网站的说明里只说了出现Database error: SQLSTATE[HY000] [2002] No such file or directory时应该进入docker,但应该如何进入的,我用docker attach 进入了pan容器,输入了
chown -R mysql /var/lib/mysql
chgrp -R mysql /var/lib/mysql
之后stop了pan容器再次启动还是出现同样的问题

@domsgit
Copy link

domsgit commented Mar 7, 2020

  1. 用docker跑起
docker run --name=pan -v /data/pan:/var/www/html/system/data/default_home_folder  -dti -p 8081:80 -p 6800:6800 jaegerdocker/pan
  1. 进入容器
docker exec -it pan bash
  1. 修改/var/lib/mysql用户所属组和所有者
chown -R mysql /var/lib/mysql
chgrp -R mysql /var/lib/mysql
  1. 退出容器
exit
  1. 重启容器
docker restart pan

@lanqsh
Copy link

lanqsh commented Nov 4, 2021

原因
1.mysqld没有启动
2.aria2c服务有问题

解决办法:
在宿主机执行下面命令进去容器内部:
docker exec -it pan bash
编辑启动脚本:
vi /start.sh
加#号注释掉两句有问题的命令

#service aria2 start
#service mysql start

然后加入启动mysqld的命令
mysqld
输入:wq退出,
然后ctrl+d退出容器后重启
docker restart pan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants