Help with cron for mysql backup

Discussion in 'MySQL' started by journeyoftheanimals, May 31, 2009.

  1. #1
    OK I am on hostgator (if that matters at all) and am trying to setup a cron job to automatically backup a database. But nothing I enter seems to work. I do not know much about this so it is a little hard to explain but I will try.

    The corn job does not need the date and stuff because it have mutiable choice for that information. The line I am trying is this as follows but I have edited it slightly to not post the name and stuff



    mysqldump -u journey -pabcd1234 journey_upgraded > /home/journey/databackupsql

    I am not at my computer right now so I do not have the error e-mail it sends me but says something about invalid password...but I have tried 2 different ones and one of them has to be the right one. I do not seem to see where I could change the password, but I will double check.

    Anyways, is anything in this obviously wrong? I have tried 4 or 5 different lines I have seen on the net but nothing works.

    I have posted on the hostgator forums but have not gotten much help as of yet.

    Oh and if it matters the database is about 6.5 megs and I think is mysql.

    Thanks in advance for any help you can give me in this.
     
    journeyoftheanimals, May 31, 2009 IP
  2. Social.Network

    Social.Network Member

    Messages:
    517
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    35
    #2
    Social.Network, May 31, 2009 IP
  3. journeyoftheanimals

    journeyoftheanimals Well-Known Member

    Messages:
    339
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #3
    mysqldump: Got error: 1045: Access denied for user 'journey_newmain'@'localhost' (using password: YES) when trying to connect
     
    journeyoftheanimals, Jun 1, 2009 IP
  4. Ralle

    Ralle Active Member

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #4
    I don't think there should be a space after -u. Usually it's -uNAME -pPASS and I hope your password is not abcd1234
     
    Ralle, Jun 1, 2009 IP
  5. journeyoftheanimals

    journeyoftheanimals Well-Known Member

    Messages:
    339
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #5
    OK, trying it that way now. No that is not my real password. I also changed the database name and password name a bit too. Not foolish enough to post that information. :D
     
    journeyoftheanimals, Jun 1, 2009 IP