To post a new support question, click the Post New Topic button below.
Current Version: 4.8.5 | Sytist Manual | Common  Issues | Feature Requests

Please log in or Create an account to post or reply to topics.
You will still receive notifications of replies to topics you are part of even if you do not subscribe to new topic emails.

Cron Error Message

R
21 posts
Fri Sep 08, 17 8:31 AM CST
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?
16,148 posts (admin)
Fri Sep 08, 17 12:22 PM CST
Where exactly are you seeing this error?
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
R
21 posts
Fri Sep 08, 17 1:59 PM CST
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
16,148 posts (admin)
Mon Sep 11, 17 5:31 AM CST
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.
R
21 posts
Tue Sep 12, 17 7:37 AM CST
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";
16,148 posts (admin)
Tue Sep 12, 17 8:27 AM CST
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
R
21 posts
Tue Sep 12, 17 8:46 AM CST
This is my command line:

php -q /home/peter15/public_html/sy-admin/sy-cron.php
16,148 posts (admin)
Tue Sep 12, 17 9:02 AM CST
Thanks Ron
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
9 total messages
Please log in or Create an account to post or reply to topics.
This post has been viewed 780 times
 
Loading more pages
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 - 2021 Grissett, LLC. All Rights Reserved.

By continuing to browse or by clicking Accept Cookies, you agree to the storing of cookies on your device necessary to provide you with the services available through our website.

    Accept   Privacy & Cookie Policy
Loading More Photos
Scroll To Top
Close Window
Loading
Close