This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
computing:linux:mysql_backup [2016/10/29 16:44] gcooper |
computing:linux:mysql_backup [2018/10/01 14:33] (current) gcooper |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Reset Forgotten PostgreSQL Password ===== | ===== Reset Forgotten PostgreSQL Password ===== | ||
- | If necessary: | + | If necessary, as '' |
< | < | ||
Line 47: | Line 47: | ||
# Mysql password | # Mysql password | ||
- | MYSQLPW=" | + | MYSQLPW=" |
# Mysql username | # Mysql username | ||
MYSQLUSER=" | MYSQLUSER=" | ||
Line 127: | Line 127: | ||
exit | exit | ||
</ | </ | ||
+ | |||
+ | ====== Restore A MySQL Backup ====== | ||
+ | |||
+ | One-liner to restore a gzipped MySQL backup: | ||
+ | |||
+ | < | ||
+ | gunzip < mysql-database-name.sql.gz | mysql -p -h localhost mysql-database-name | ||
+ | </ | ||
+ | |||
+ | :!: You will need to enter the database password of the database on ' |