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
Ron Peterson
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?
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
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
My Email Address: info@picturespro.com
R
Ron Peterson
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.
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
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.
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
My Email Address: info@picturespro.com
This reply was deleted.
R
Ron Peterson
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";
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
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
My Email Address: info@picturespro.com
R
Ron Peterson
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
php -q /home/peter15/public_html/sy-admin/sy-cron.php
Tim - PicturesPro.com
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
My Email Address: info@picturespro.com
Please log in or Create an account to post or reply to topics.
Loading more pages