Home arrow Latest Tutorials arrow Backup a MySQL Database
Backup a MySQL Database PDF  
Digg Reddit Stumble Upon Facebook Twitter Google Technorati Bookmark
Saturday, 15 December 2007
This small tutorial shows you howto backup/ restore a MySQL Database. You will need to have shell access to your mysql server or to be able to connect remotely using mysql client to your mysql server.

1. Backup your MySQL Database

#mysqldump database -p > file.sql


2. Restore your MySQL Database

#mysql -u username -p
mysql> \. file.sql


First go to your mysql client then type \. file.sql
You should be in the same directory as your file.sql file. If not, then use file.sql with absolute path to it. (for example if your file is located in /home/john/database, and the file name is file.sql, then the yo shoud use instead of file.sql, /home/john/database/file.sql
 
< Prev   Next >

Misc

Linux Tips

Polls

What is your favorite Linux Distribution ? (we just added Mint and reset the pool data)