If you have a support question or comment, click the Post New Topic link below. Sytist Manual | Sytist Articles | Facebook Page.

Cron Error Message

 
Please log in or Create an account to post or reply to topics.
 
Ron Peterson
Fri Sep 08, 17
8:31 AM
I finally tried to setup cron yesterday but received this error message:

Unable to connect to the databaseCan't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

What to do next?
 
 
 
 
 
Tim - PicturesPro.com
admin
Fri Sep 08, 17
12:22 PM
Where exactly are you seeing this error?
 
 
 
 
 
Tim Grissett, DIA - PicturesPro.com || My Email Address: info@picturespro.com
Ron Peterson
Fri Sep 08, 17
1:59 PM
This message was emailed:

From: Cron Daemon [root@xerxes.lunarpages.com]
Sent: Friday, September 08, 2017 4:32 AM
To: Admin@PetersonsPhoto.com

Unable to connect to the databaseCan't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

The message comes every minute... each time cron is run.
Edited Fri Sep 08, 17 2:06 PM by Ron Peterson
 
 
 
 
 
Tim - PicturesPro.com
admin
Mon Sep 11, 17
5:31 AM
The error can't connect to local MySQL server means for some reason it can't connect to the database from the cron job.

I did some searching on setting up a cron job on lunerpages and one page suggests the command line should start with php then path to the file.

Example:

php /home/user/public_html/sy-admin/sy-cron.php

In your Sytist admin when you go to Settings -> Automated Emails, copy the path for the cron file and remove the "/usr/bin/php -q" part and replace it with just "php" (no quotes) and add that in your cron command line.

If that doesn't work, you will need to ask your host what you should be using for the command line in the cron job.
 
 
 
 
 
Tim Grissett, DIA - PicturesPro.com || My Email Address: info@picturespro.com
This reply was deleted.
Ron Peterson
Tue Sep 12, 17
7:37 AM
Lunerpages Support suggested changing Localhost to 127.0.0.1 in sy-config.php

I added the following to the bottom of sy-config.php. Cron is working ok. I received TEST EMAIL ok

// From LunarPages 9-12-2017 for Cron use 127.0.0.1
//$setup['pc_db_location'] = "localhost";$setup['pc_db']
$setup['pc_db_location'] = "127.0.0.1";$setup['pc_db'] = "peter15_sytist";$setup['pc_db_user'] = "peter15_peter15";
 
 
 
 
 
Tim - PicturesPro.com
admin
Tue Sep 12, 17
8:27 AM
What did you put in for the command line in the cron job? I want to update the manual with this info for lunerpages.
 
 
 
 
 
Tim Grissett, DIA - PicturesPro.com || My Email Address: info@picturespro.com
Ron Peterson
Tue Sep 12, 17
8:46 AM
This is my command line:

php -q /home/peter15/public_html/sy-admin/sy-cron.php
 
 
 
 
 
Tim - PicturesPro.com
admin
Tue Sep 12, 17
9:02 AM
Thanks Ron
 
 
 
 
 
Tim Grissett, DIA - PicturesPro.com || My Email Address: info@picturespro.com

Loading more pages
Sign up for email promotions.
Your information is safe with us and won't be shared.
Thank you for signing up!
 
©2003 - 2017 Grissett, LLC. All Rights Reserved.
Loading More Photos
Scroll To Top
Close Window
Loading
Close