How can we take a backup of a mysql table and how can we
restore it. ?

Answer Posted / ajay giri

We can use below query for exporting data to a .txt file.

mysql> SELECT * FROM <table_name> INTO
OUTFILE '<file_name>' FIELDS TERMINATED BY ',';

We can use below query for importing data from .txt file

mysql> LOAD DATA INFILE <file_name> INTO
TABLE '<table_name>'
FIELDS TERMINATED BY ',';

Is This Answer Correct ?    20 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to delete cookie files on your computer?

547


Does php support function overloading?

561


Tell me what library is used for pdf in php?

518


What is final class and final method in php?

551


How to create a session? How to set a value in session?

517






How to insert a line break in php string?

546


How to call javascript function in php without any event?

495


What enctype is required for file uploads to work?

519


What is php and why it is used?

545


What is prepared statement in php?

586


Write a program to find a string is palindrome or not?

516


What is php pathinfo?

579


How to invoke a user function?

547


Write a program in php to reverse a number?

542


What is difference between session and cookie in PHP?

517