el123
asked on
MySQL: how to take the backup of the database using mysqldump
Hi, I just want to take the mysql db backup using mysqldump.
Can any help.
Thanks,
EL
Can any help.
Thanks,
EL
To allow for consistent reads from the database and to control character set issues, I recommend doing it like this:
mysqldump --single-transaction --result-file=db_name.sql db_name --default-character-set=ut f8
Reference:
http://dev.mysql.com/doc/refman/5.0/en/backup-policy.html
mysqldump --single-transaction --result-file=db_name.sql db_name --default-character-set=ut
Reference:
http://dev.mysql.com/doc/refman/5.0/en/backup-policy.html
As 'hielo' mentioned 'mysqldump' is the tool to take mysql database backup.
Also, What kind of tables do you use ? innodb or myisam? if your answer is innodb then don't forget to use --single-transaction option to get a consistent dump.. and if its myisam table then without locking you will not be getting a consistent backup...so make sure its locked before you dump...
Also, What kind of tables do you use ? innodb or myisam? if your answer is innodb then don't forget to use --single-transaction option to get a consistent dump.. and if its myisam table then without locking you will not be getting a consistent backup...so make sure its locked before you dump...
Oops.. not refreshed :-)
ASKER
thank Gurus, my tables are all Innodb, and I want script too, so I can automate them to be taken on certain schedules
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you check this?
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html