Mysql backup & restore

From AWVVO
Revision as of 10:55, 29 January 2025 by Admin (talk | contribs) (Created page with "== Backup == <syntaxhighlight lang="bash" line highlight="" copy> mysqldump -u root -p --add-drop-database --delete-all-tables sfc > /tmp/sfc.sql </syntaxhighlight> == Restore == <syntaxhighlight lang="bash" line highlight="" copy> mysql -u root -p newdb < backup.sql </syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Backup

mysqldump -u root -p --add-drop-database --delete-all-tables sfc > /tmp/sfc.sql

Restore

mysql -u root -p newdb < backup.sql