Backup and Restore Mysql data using Linux commands.The steps includes:
A)Backup:
1.Connect to server
2.Create a Directory where you would like to backup your data(like /bak).
3.using shell prompt(terminal) to to the dir(/bak)
4.use the following command to backup the data:
mysqldump -u username -ppassword dbname > filename.sql
please note there shouldn't be space between -p and password.
B)Restore:
1. Open SSh file browser
2. upload dump file somewhere (any directory)
3. Open SSH Secure shell client with your SSH uid and password
$mysql -u dbuid -ppass (Please note that there is no space between -p
and password)
mysql>use dbname
mysql>source /home/pinky/pairdum.sql (location of the dump file)
* for any help use help command
Friday, January 4, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment