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.

How can I create all MySQL dumps at once.

Discussion in 'General Discussion' started by MarcelB, Aug 22, 2008.

  1. MarcelB

    MarcelB Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    I'd want to upgrade MySQL from 4.1 to 5 and read it is best to create MySQL dumps of every database as backup in case you need to restore them when going back to 4.1

    How can I create dumps of all databases in one go?
    Is there anything special that is important about backing up?

    And how can I restore these in one go if needed?
     
  2. MaestriaNick

    MaestriaNick Well-Known Member

    Joined:
    Aug 6, 2008
    Messages:
    159
    Likes Received:
    3
    Trophy Points:
    18
    command to take dump for all at once is

    mysqldump -u root -p --all-databases > filename.sql

    dump for all databases will be in filename.sql file,

    to restore

    mysql -u root -p < filename.sql
     
  3. MarcelB

    MarcelB Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    I am getting an password error:

    I used the root password (tried 2x). What other password should be used here ?
     
  4. MarcelB

    MarcelB Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
  5. darkshadow604

    darkshadow604 Active Member

    Joined:
    Feb 4, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Use --force

     
  6. MarcelB

    MarcelB Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Thanks all,

    using force did the trick. Updated MySQL succesfully.
     
Loading...

Share This Page