Thread: SQL dumps
View Single Post
  #3  
Old 4th May 2005, 11:57
ingo ingo is offline
Junior Member
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you don't have a database password (very insecure!), use this:

Code:
mysqldump -h <db_server, e.g. localhost> -u <db_user, e.g. root> -c --add-drop-table --add-locks --all --quick --lock-tables <db_name> > /path/to/your/sql_dump.sql
If you have a database password:

Code:
mysqldump -h <db_server, e.g. localhost> -u <db_user, e.g. root> -p<db_password, no space after -p!> -c --add-drop-table --add-locks --all --quick --lock-tables <db_name> > /path/to/your/sql_dump.sql
Ingo
Reply With Quote