Mysql backup & restore: Difference between revisions

From AWVVO
Jump to navigationJump to search
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>"
 
 
Line 1: Line 1:
== Backup ==
== Backup ==
<syntaxhighlight lang="bash" line highlight="" copy>
<syntaxhighlight lang="bash" line highlight="" copy>
mysqldump -u root -p --add-drop-database --delete-all-tables sfc > /tmp/sfc.sql
mysqldump -u root -p sfc > /tmp/sfc.sql
</syntaxhighlight>
</syntaxhighlight>



Latest revision as of 10:56, 29 January 2025

Backup

mysqldump -u root -p sfc > /tmp/sfc.sql

Restore

mysql -u root -p newdb < backup.sql