Moved MySQL db to home directory and now cron jobs can't connect to the database
I recently moved my MySQL databases from root to home and symlinked the old folder to the new one, rebooting the server in the process. The website is working fine and scripts are connecting to MySQL as before without any changes. The only problem I have now is that cron jobs on attempting to connect to the MySQL database return:
"Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)"
The commands run perfectly fine if I run them in the shell as root, it's just they all return that error when the cron job tries to run them. Any suggestions of where to look for the problem?
-
Hello :) There are a couple of solutions listed in this thread: Cron Job - Unable to Access Databases Thank you. 0
Please sign in to leave a comment.
Comments
1 comment