how to take mysql database structure backup

Answer Posted / nivedita

select INTO statement id used to take a back of the table.

syntax
select coloum_name(s) INTO NewTable(in external database)
from source table;
example: select * into person_backup from persons;

------------
another way is to take a dump
mysqldump -h hostname -u username -p password database >
backupdtabase.sql

o [username] - this is your database username
o [password] - this is the password for your database
o [databasename] - the name of your database
o [backupfile.sql] - the file to which the backup
should be written.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What could be the reason that the mysql statement 'select avg (salary) from emp' generates an inaccurate output?

501


How to enter Characters as HEX Numbers?

551


How does php communicate with mysql?

482


How many triggers are possible in mysql?

515


What are the differences between char and nchar?

537






Can you tell the difference between mysql_fetch_object and mysql_fetch_array?

505


Can we write pl sql mysql?

506


What is the use of mysqli_fetch_array?

484


How many columns can you create for an index?

493


Why do gaps in sequences occur?

518


What is the difference between the primary and unique key in mysql?

467


How do I stop a mysql service?

515


How to represent ENUMs and SETs internally?

641


What is bigint in mysql?

518


How does mysql store binary data?

511