0

我从 cpanel 设置了一个 cronjob,但意外地导致了 mysql 错误。

This is the command i set from CPANEL:

php -f /home/server1/public_html/xad/imp.php

It need to be executed after half hour.

1) This job runs from browser without issue. 

2) Also it runs from commandline correclty.
**root@server1 [~]# php -f /home/server1/public_html/xad/imp.php**


But it failed from cpanel cronjob setting and cause mySQL Error:

**Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)**

I am using pconnect as below:
$link = mysql_pconnect($hostName, $userNam_souq, $password) or die(mysql_error());
4

0 回答 0