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

What is the best practice for running mysql queries in php? Consider the risk of sql injection.

791


what are the differences between php and perl

1809


What is abstraction php?

740


What is the method to register a variable into a session?

643


How to get no. of rows using MYSQL function?

798


What is the use of mysqli_real_escape_string() function?

715


Explain the difference between urlencode and urldecode?

789


How can we know the total number of elements of Array?

812


What is trim codeigniter?

750


What are the different filter functions used to filter a variable?

744


Does browser understand php?

680


What do the initials of php stand for?

803


What is the current stable version of php?

775


How to increase the maximum execution time of a script in php?

768


How is it possible to cast types in php?

717