How to take the backup of full database using mysql?
How to take the backup of full database using mysql?
You could use mysqldump
. Have a look at the reference manual: 4.5.4. mysqldump — A Database Backup Program
[mysqldump] can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both.
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
Here is an example using mysqldump, you can create an Scheduled task or a cron job to automatize the backup process:
mysqldump --opt --host=localhost --user=myUser --password=myPass --result-file=C:\Backups\myBackupFile.sql myDatabase
If you have access to phpMyadmin, try the export function as it's probably the easiest way.
精彩评论