安裝V3版本一切順利,順利的建了網(wǎng)站的,運(yùn)行約有一個(gè)月的時(shí)間,最近出現(xiàn)了兩次數(shù)據(jù)庫(kù)錯(cuò)誤而導(dǎo)致網(wǎng)站無(wú)法打開(kāi),打開(kāi)網(wǎng)站時(shí)有以下顯示:Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused
輸入命令 service mysqld restart 后有以下顯示:
[root@host ~]# service mysqld restart
MySQL server PID file could not be found! [FAILED]
Starting MySQL.
這時(shí)候網(wǎng)站就可以打開(kāi)了
從網(wǎng)站看到教程有關(guān)更改 MySQL server PID file could not be found! [FAILED] 的方法:
vi /www/wdlinux/init.d/mysqld
修改
basedir=/www/wdlinux/mysqld
datadir=/www/wdlinux/mysqld/var
修改成功后沒(méi)有管它,反正網(wǎng)站已可以打開(kāi)的,沒(méi)再理會(huì)的
過(guò)了不到一個(gè)星期又遇到同樣的問(wèn)題 數(shù)據(jù)庫(kù)無(wú)法鏈接 這個(gè)時(shí)候再輸入命令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)
今天是第三次出現(xiàn)了,打開(kāi)網(wǎng)站時(shí)又提示: Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused
昨天我還測(cè)試過(guò)網(wǎng)站是正?纱蜷_(kāi)的