skip to main | skip to sidebar

I Didn't Know This Yesterday

Things that I didn't know until today. Generally of a work-related technical nature.

Wednesday, 20 August 2008

Backing up MySQL databases

Backup...

> mysqldump mydatabase > mydatabase.sql


Restore...

> mysql < mydatabase.sql


Options:

-X : outputs database info as XML.
--all-databases : dumps all databases to stdio
-p : to add a password
Posted by LJ at 15:28

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2010 (4)
    • ►  July 2010 (1)
    • ►  April 2010 (1)
    • ►  March 2010 (1)
    • ►  January 2010 (1)
  • ►  2009 (4)
    • ►  November 2009 (1)
    • ►  September 2009 (1)
    • ►  May 2009 (1)
    • ►  January 2009 (1)
  • ▼  2008 (44)
    • ►  December 2008 (3)
    • ►  October 2008 (2)
    • ►  September 2008 (5)
    • ▼  August 2008 (6)
      • Linux: Check if a system service is running...
      • Backing up MySQL databases
      • Finding Linux xwindow size
      • Capturing the screen to video with ffmpeg
      • Adding H264 to ffmpeg and libraries
      • Using subversion through a proxy
    • ►  July 2008 (12)
    • ►  June 2008 (16)