Skip to content
IT related

MYSQL

Updated 1 min read

On this page 2 sections
  1. MYSQL Cheatsheet.
  2. MYSQL DUMP

MYSQL Cheatsheet.

MYSQL DUMP

Mysql Dump will give you a copy of the entire database in a sql document. Which is a form of backup, because the dump file is in a format that can be importet back into a mysql database.
See below the format required and an example.

mysqldump -u [user name] -p [database name] > [dump file]
mysqldump -u fullmetal -p fullmetal-db > fullmetal-db.sql

To restore from a sql dump file do the following.

mysql -p -u[user] [database] < db_backup.dump
mysql -u fullmetal -p fullmetal-db < fullmetal-db.sql

If the dump contains multiple databases you should omit the database name:

mysql -p -u[user] < db_backup.dump
IT related RSS feed Published with Oblish

Keyboard shortcuts

/
Search
[
Previous page
]
Next page
?
Show this list
Esc
Close