Section: mysqldump and restore

Restore from a SQL dump

bash
bash
mysql -u root -p app_db < app_db.sql
Explanation

This replays the SQL statements in the dump file against the target database.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing mysqldump and restore
Dump one database
Export schema and data from one database.
OpenIn sheetbashsame section
Dump one table
Export a single table only.
OpenIn sheetbashsame section
Dump schema only
Export DDL without row data.
OpenIn sheetbashsame section
Dump data only
Export rows without CREATE statements.
OpenIn sheetbashsame section
Load CSV data into a table
Import delimited files efficiently.
OpenIn sheetsql1 tag match
Load a MySQL Shell dump
Restore a dump created by MySQL Shell utilities.
OpenIn sheetbash1 tag match