Monday, November 1, 2010

Backing up and restoring a mySql database

1. Create backup

$ mysqldump -u root -proot regdb > /home/yumani/Documents/regdb_back.sql


2. Restore

Create a database in mysql and the grant user access
mysql >  create database regdb;
mysql >  grant all on regdb.* to wso2bam@'%' identified by 'wso2bam';

$ mysql -u root -proot regdb < /home/yumani/Documents/regdb_back.sql

Day 03 Gala Dinner Highlight Video