RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Linux commands to Backup and Restore MySQL database

To backup a MySQL database we need to know a name of the specific database we would liken to backup. Let's assume that we are going to backup a database named mysql-data.

$ mysqldump -u root -p mysql-data  mysql-data-backup.sql

The previous command will dump / backup database mysql-data into a file mysql-data-backup.sql. -u option specifies a user with access to the mysql-data database and -p option will prompt for a root password.
To restore a MySQL database from a backup file the following command can be used:

$ mysql -u root -p mysql-data < mysql-data-backup.sql

This will restore a database from a backup file to a destination database mysql-data. Usage of -p and -u options with mysql command is the same as in previous command.

Share this linux post:

Submit Linux commands to Backup and Restore MySQL database in Delicious Submit Linux commands to Backup and Restore MySQL database in Digg Submit Linux commands to Backup and Restore MySQL database in FaceBook Submit Linux commands to Backup and Restore MySQL database in Google Bookmarks Submit Linux commands to Backup and Restore MySQL database in Stumbleupon Submit Linux commands to Backup and Restore MySQL database in Technorati Submit Linux commands to Backup and Restore MySQL database in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download