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 create an array of a group of items inside an html form?

569


How arrays are passed through arguments?

610


Explain converting an object?

612


How do you use bcrypt for hashing passwords in php?

534


What is a http session?

541






What is the difference between htmlentities() and htmlspecialchars()?

539


Explain the importance of the function htmlentities.

541


Are php short tags acceptable to use?

525


How to convert strings to upper or lower cases?

559


What are php keywords?

533


Tell me how to execute an sql query? How to fetch its result?

495


List some features of php that are deprecated in php

503


What is Gd PHP?

583


What is the difference server side and browser side validation?

485


What is csrf token and how it works?

523