How To Dump a Table to a File with \"mysqldump\"?

Answer

If you want to dump all rows in a table from the server to a file, you can use "mysqldump" with the "-f fileName" option as show in the following tutorial exercise:

>cd mysqlbin
>mysqldump -u root -r templinks.txt test links
>type templinks.txt

>type templinks.txt | more -- MySQL dump 10.10 --

-- Host: localhost Database: test -- ------------------------------------------------------

-- Server version 5.0.24-community ...

The dump file contains SQL statements that you can use to restore the table and its data content.

All sql dba Questions

Ask your interview questions on sql-dba

Write Your comment or Questions if you want the answers on sql-dba from sql-dba Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---