mysqldump -u app -p appdb > appdb.sql

Category: Databases & SQL

mysqldump -u app -p appdb > appdb.sql

Back up one database to a SQL file

Dumps appdb as CREATE TABLE and INSERT statements the mysql client can replay. The shell redirect writes the file. Add --single-transaction for a consistent snapshot on InnoDB without locking.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.