The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Moved MySQL db to home directory and now cron jobs can't connect to the database

Discussion in 'Database Discussions' started by johnmark33, May 12, 2014.

  1. johnmark33

    johnmark33 Registered

    Joined:
    Mar 20, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    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?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,807
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page