MySQL Database Dumping and Importing through Command line MySQL is one of the most popular database management systems for the development of interactive Websites that need to utilize persistent data sources. As with all other popular database management systems, MySQL offers several methods to backup your important data. Following way you can do: To create a database: $mysql> create database ; To backup this database and save it in a file run: $ mysqldump -h -u -p > somedatabasetable.sql To import this database: $ mysql -h -u -p < somedatabasetable.sql or $mysql> somedatabasetable.sql Backup MySQL Database automatically using cron: "cron" is a time-based scheduling utility in Unix/Linux operating system. It reads a configure file (/etc/crontab) when it starts up and keeps running while the computer is running. It will execute some programs at some given moment. Add the following line in /etc/crontab: 15 2 * * * root mysqldump -u root -p PASSWORD --all-databases | gzip > /mnt/disk2/database_`data '+%m-%d-%Y'`.sql.gz "15 2 * * *" means "minute, hour, day of month, month, day of week" respectively. The character '*' stands for "any". "root" means "run following command as root account". "mysqldump -u root -pPASSWORD --all-databases" means backing up all the MySQL databases. Finally, you should use '/etc/init.d/cron restart' command to restart the cron. Then your computer or your server will backup MySQL databse at given time. More Details: http://www.rvdavid.net/importing-sql-dumps-into-mysql-through-command-line/ http://www.yolinux.com/TUTORIALS/LinuxTutorialMySQL.html http://www.backuphowto.info/how-backup-mysql-database-automatically-linux-users http://articles.sitepoint.com/article/backing-up-mysqldump http://www.backuphowto.info/how-backup-mysql-database-automatically-linux-users