How can we take a backup of a MySQL table and how can we restore it. ? | PHP

We can use below query for exporting data to a .txt file.
mysql> SELECT * FROM INTO
OUTFILE '' FIELDS TERMINATED BY ',';
We can use below query for importing data from .txt file
mysql> LOAD DATA INFILE INTO
TABLE '<table_name>'
FIELDS TERMINATED BY ',';