Posted By

klovera on 10/18/11


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


MySQL dump

 / Published in: Bash

Used to dump the entire contents of a database. Customize -u [username] -p[password] name of the table and the name of the file to dump to. Likewise with [host] (probably localhost if on same server), [tablename] and [dumpfilename.sql].

  1. mysqldump -h [host] -u [username] -p[password] -c --add-drop-table --add-locks --all --quick --lock-tables [tablename] > [dumpfilename.sql]
  3. # example
  4. mysqldump -u admin -p [dbase] > [filename].sql

Report this snippet  

You need to login to post a comment.