Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    156
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. MaestriaNick

    MaestriaNick Well-Known Member

    Joined:
    Aug 6, 2008
    Messages:
    159
    Likes Received:
    3
    Trophy Points:
    68
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. MarcelB

    MarcelB Well-Known Member

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

    I used the root password (tried 2x). What other password should be used here ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. MarcelB

    MarcelB Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. darkshadow604

    darkshadow604 Active Member

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

     
  6. MarcelB

    MarcelB Well-Known Member

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

    using force did the trick. Updated MySQL succesfully.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice