MySQL 8.4 · Backup and restore

Restore a dump

Replay a SQL dump into a database that already exists.

mysql -u root -p mydb < mydb.sql

Caution: Statements in the dump can overwrite existing tables. Restore into a new database first if unsure.

Official MySQL 8.4 documentation

More backup and restore commands

All backup and restore commands · MySQL 8.4 cheatsheet

Was this page helpful?