Training

When: Every first Sunday of every month -get a ticket- from $15 (Click Here).

Tuesday, October 25, 2016

How to Back Up and Restore a MySQL Database

Restoring your MySQL Database


Above we backup the Tutorials database into tut_backup.sql file. To
re-create the Tutorials database you should follow two steps:


  • Create an appropriately named database on the target machine
  • Load the file using the mysql command:
$ mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql]
 
example:
$ mysql -u username -pTHISISTHEPASSWORD DATABASENAME < DATABASENAMEBKP.sql


EASY!





How to Back Up and Restore a MySQL Database

No comments: