User Tools

Site Tools


computing:linux:mysql_backup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 ''root'':
  
 <file> <file>
Line 47: Line 47:
  
 # Mysql password # Mysql password
-MYSQLPW="bad1egg!!"+MYSQLPW="password"
 # Mysql username # Mysql username
 MYSQLUSER="root" MYSQLUSER="root"
Line 127: Line 127:
 exit exit
 </file> </file>
 +
 +====== Restore A MySQL Backup ======
 +
 +One-liner to restore a gzipped MySQL backup:
 +
 +<file>
 +gunzip < mysql-database-name.sql.gz | mysql -p -h localhost mysql-database-name
 +</file>
 +
 +:!: You will need to enter the database password of the database on 'localhost' being restored to.
computing/linux/mysql_backup.1477781059.txt.gz · Last modified: 2016/10/29 16:44 by gcooper