Reverse detail from Kakelbont MS 1, a fifteenth-century French Psalter. This image is in the public domain. Daniel Paul O'Donnell

Forward to Navigation

MySQL cheatsheet

Posted: Aug 27, 2012 13:08;
Last Modified: Aug 27, 2012 14:08



MySQL Dump/Restore

Dump ALL MySQL Databases

mysqldump —user=XXXXXXXX —password=XXXXXXX -A > /PATH/TO/DUMPFILE.SQL

Dump Individual or Multiple MySQL Databases

mysqldump —user=XXXXXXXX —password=XXXXXXX —databases DB_NAME1 DB_NAME2 DB_NAME3 > /PATH/TO/DUMPFILE.SQL

Dump only certain tables from a MySQL Database

mysqldump —user=XXXXXXXX —password=XXXXXXXX —databases DB_NAME —tables TABLE_NAME > /PATH/TO/DUMPFILE.SQL

Restoring dbase

  1. Use the following procedure to reload the contents of a database:
  2. Unzip the backup file you wish to use.
  3. Open it up and pull out only the information that you will need.
  4. Save this text file.
  5. Use the following command to feed back in the contents of a text file:
mysql —verbose —user=XXXXXXXX —password=XXXXXXXX DB_NAME < /PATH/TO/DUMPFILE.SQL

Back to content

Search my site


Current teaching

Recent changes to this site


anglo-saxon studies, caedmon, citation, citation practice, citations, composition, computers, digital humanities, digital pedagogy, exercises, grammar, history, moodle, old english, pedagogy, research, student employees, students, study tips, teaching, tips, tutorials, unessay, universities, university of lethbridge

See all...

Follow me on Twitter

At the dpod blog