mysqldump -u root -p --databases app_db > app_db.sqlA standard logical backup command for development, migration, and restore workflows.
mysqldump, mysql restore, load data infile, select into outfile, mysqlimport, and MySQL Shell dump/load workflows.
Portable logical backups with mysqldump and reload patterns.
mysqldump -u root -p --databases app_db > app_db.sqlA standard logical backup command for development, migration, and restore workflows.
mysqldump -u root -p app_db users > users.sqlUseful for debugging, selective migrations, or sharing one dataset slice.
mysqldump -u root -p --no-data app_db > app_db-schema.sqlCommon when you want table definitions for code review or environment bootstrapping.
mysqldump -u root -p --no-create-info app_db > app_db-data.sqlHandy when the schema already exists and you only need data.
mysql -u root -p app_db < app_db.sqlThis replays the SQL statements in the dump file against the target database.
CSV import/export and higher-throughput dump tooling patterns.
SELECT id, email
INTO OUTFILE '/var/lib/mysql-files/users.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '
'
FROM users;Requires file privileges and uses a path writable by the server.
LOAD DATA INFILE '/var/lib/mysql-files/users.csv'
INTO TABLE users_staging
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '
'
IGNORE 1 LINES
(email, full_name);Much faster than many single-row inserts for bulk imports.
mysqlimport -u root -p --local --fields-terminated-by=, app_db users.csv`mysqlimport` is a wrapper around `LOAD DATA` semantics.
mysqlsh root@localhost -- util dump-instance /backups/mysql-instanceMySQL Shell dump utilities support advanced dump and load workflows beyond classic mysqldump.
mysqlsh root@localhost -- util load-dump /backups/mysql-instanceUseful for parallelized and more automation-friendly restore workflows.