V3遇到运行一段时间后数据库链接错误SQLSTATE[HY000] [2002] Connection refused
安装V3版本一切顺利,顺利的建了网站的,运行约有一个月的时间,最近出现了两次数据库错误而导致网站无法打开,打开网站时有以下显示:[color=#000][font=Simsun]Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused[/font][/color][font=Simsun][size=3][color=#000000]输入命令 service mysqld restart 后有以下显示:[/color][/size][/font]
[font=Simsun][size=3][color=#000000][root@host ~]# service mysqld restart
MySQL server PID file could not be found! [FAILED]
Starting MySQL.
这时候网站就可以打开了
从网站看到教程有关更改 MySQL server PID file could not be found! [FAILED] 的方法:
vi /www/wdlinux/init.d/mysqld
修改
basedir=/www/wdlinux/mysqld
datadir=/www/wdlinux/mysqld/var
修改成功后没有管它,反正网站已可以打开的,没再理会的
[/color][/size][/font][font=Simsun][size=3][color=#000000]过了不到一个星期又遇到同样的问题 数据库无法链接 这个时候再输入命令service mysqld restart后有以下提示:
[root@host ~]# service mysqld restart
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
MySQL server PID file could not be found! [FAILED]
/etc/init.d/mysqld: line 256: my_print_defaults: command not found
/etc/init.d/mysqld: line 276: cd: /www/wdlinux/mysqld: No such file or directory
Starting MySQLCouldn't find MySQL server (/www/wdlinux/mysq[FAILED]ysqld_safe)
此时无法打开网站,然后再把 basedir= 和 datadir= 修改回来,再运行service mysqld restart后仍是上一次那样的提示,网站就可以打开了
现在担心仍会过几天不知什么时间的又出现相同的问题而网站打不开的
有哪位朋友知道怎么解决这样的问题吗?
谢谢!
linux是 centos6.6 wdcp是
[color=#333333][font=微软雅黑][size=12px]v3.0.8 [/size][/font][/color]
[/color][/size][/font] 没人遇到过吗? 那个提示很正常,因为mysql挂了或停止了 [b]回复 [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=94991&ptid=55892]3#[/url] [i]admin[/i] [/b]
今天是第三次出现了,打开网站时又提示: [color=#000][font=Simsun]Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused[/font][/color]
昨天我还测试过网站是正常可打开的
记得就是从在V3的后台点了那个升级更新后出现的这个问题的
[color=#333333][font=微软雅黑][size=12px]当前版本: wdCP v3.0.8 最新 [/size][/font][/color][font=微软雅黑][size=12px]v3.0.8[/size][/font]
[font=微软雅黑][size=12px]操作系统:2.6.32-642.11.1.el6.x86_64[/size][/font]
[font=微软雅黑][size=12px]运行时间:43 天 21 小时 7分[/size][/font]
[font=微软雅黑][size=12px]
[/size][/font]
刚刚又重启了下mysql后网站又能打开了
难道等个四五天后再出现这个问题后再重启一下? 没人遇到过这样的问题吗? @wjq588jk 解决了吗?我也遇到,无解 我也是这样的情况,进经常数据库连接失败!!重启数据库又恢复正常!!! 看来遇到同样问题了,待解决了!:) 请管理员帮解决一下这个问题!我的基本每天都会挂一次 [b]回复 [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=98192&ptid=55892]9#[/url] [i]linyanqi[/i] [/b]
我的也每天挂一次! 不看下日志不分析解决,真遇到问题的,每天挂一次,也正常 我也是,每天挂一次
页:
[1]