Jump to content

MariaDB:Bakup and Restore: Difference between revisions

From Wiki
Line 10: Line 10:
  shell> mysql DB_Name < Backup-Name.sql
  shell> mysql DB_Name < Backup-Name.sql


See the [https://mariadb.com/kb/en/mysqldump/ mysqldump] page for detailed syntax and examples.
See the [https://bit.ly/30eYG4Y mysqldump] page for detailed syntax and examples.


===Cara 2===
===Cara 2===

Revision as of 06:35, 11 November 2021

Menggunakan MySQLDump

Cara 1

  • Backing up a single database
shell> mysqldump DB_Name > Backup-Name.sql
  • atau
mysqldump -u DB_Name -p -A > Backup-Name.sql
  • Restoring or loading the database
shell> mysql DB_Name < Backup-Name.sql

See the mysqldump page for detailed syntax and examples.

Cara 2

  • BackUp
mysqldump -u DB_USER_OR_ROOT -p MEDIAWIKI_DATABASE_NAME > /opt/mediawiki-migration-backup/db/database.sql
  • Resotore
mysql -u bluespice -p bluespice < /opt/mediawiki-migration-backup/db/database.sql

Source