how to take mysql database structure backup
Answers were Sorted based on User's Feedback
Answer / rupa bagherwal
mysqldump -uusername -ppassword databasename --no-data >
backupfilename.sql
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / 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 |
Answer / shripad chandratre
INSERT INTO Backup_file SELECT * FROM file
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / anil alpati
mysqldump --no-data --databases <dbname> > structurebackup.sql
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / sandeep
mysqldump -d -uusername -ppassword databasename --no-data
--skip-opt > /tmp/databasename.sql
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sonali
mysqldump -d -uusername -ppassword databasename > backupfile.sql
Is This Answer Correct ? | 1 Yes | 1 No |
What are the indexes in mysql?
What is sqlyog?
How many triggers are possible in mysql?
How to rename an existing column in a table?
How do I change the max connections in mysql?
Which storage engine is best in mysql?
How do you rename a table?
Write a query to retrieve a hundred books starting from 20th.
What are the nonstandard string types?
What does a TIMESTAMP do on UPDATE CURRENT_TIMESTAMP data type?
What is difference between mysql and mysqli?
How to include comments in sql statements?