We Recommend

SQL Cookbook SQL Cookbook
Written in O'Reilly's popular Problem/Solution/Discussion style, the SQL Cookbook is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, we all have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The SQL Cookbook moves quickly from problem to solution, saving you time each step of the way.


Posted By

yuconner on 09/18/06


Tagged

database commands


Versions (?)


MySQL dump/export command


Published in: SQL 


(taking cori comment into account)

  1. mysqldump -u USER -p DATABASE > filename.sql

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: cori on October 1, 2007

don't, don't, don't type your password on the command line like this. A better snippet would be:

mysqldump -u USER -p DATABASE > filename.sql

this way mysql will ask you for your password interactively. If you do what the original snippet says, your password will appear in plain text in your history file. If you provide it interactively it will never show up in a log.

You need to login to post a comment.