Thread:Project:Support desk/DB connection error when running deleteArchivedRevisions.php/reply

See if this helps you:.

Maybe the PHP command line binaries are different from the PHP used in the webserver, or point to different php.ini configuration files, in which case the location of the mysql socket may be wrong in the PHP CLI installation. If that's the problem, fix it in the php.ini of the CLI or symlink it as suggested on the link I gave.