Reloading Delimited-Text Format Backups - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

It is best that
the
[305]
--tab
written by the server in the remote directory (on the server host), whereas the
by
mysqldump
For
mysqldump
between column values, no quotation marks around column values, and newline as the line terminator.
(These are the same defaults as for
To enable data files to be written using a different format,
--fields-terminated-by=str
The string for separating column values (default: tab).
--fields-enclosed-by=char
The character within which to enclose column values (default: no character).
--fields-optionally-enclosed-by=char
The character within which to enclose non-numeric column values (default: no character).
--fields-escaped-by=char
The character for escaping special characters (default: no escaping).
--lines-terminated-by=str
The line-termination string (default: newline).
Depending on the value you specify for any of these options, it might be necessary on the command
line to quote or escape the value appropriately for your command interpreter. Alternatively, specify the
value using hex notation. Suppose that you want
quotation marks. To do so, specify double quote as the value for the
option. But this character is often special to command interpreters and must be treated specially. For
example, on Unix, you can quote the double quote like this:
--fields-enclosed-by='"'
On any platform, you can specify the value in hex:
--fields-enclosed-by=0x22
It is common to use several of the data-formatting options together. For example, to dump tables in
comma-separated values format with lines terminated by carriage-return/newline pairs (\r\n), use this
command (enter it on a single line):
shell>
mysqldump --tab=/tmp --fields-terminated-by=,
--fields-enclosed-by='"' --lines-terminated-by=0x0d0a db1
Should you use any of the data-formatting options to dump table data, you will need to specify the
same format when you reload data files later, to ensure proper interpretation of the file contents.

7.4.4. Reloading Delimited-Text Format Backups

For backups produced with
file containing the
.sql
data. To reload a table, first change location into the output directory. Then process the
to create an empty table and process the
mysql
shell>
mysql db1 < t1.sql
shell>
mysqlimport db1 t1.txt
Reloading Delimited-Text Format Backups
[305]
be used only for dumping a local server. If you use it with a remote server,
--tab
directory must exist on both the local and remote hosts, and the
in the local directory (on the client host).
--tab, the server by default writes table data to
[300]
mysqldump
CREATE TABLE
SELECT ... INTO
OUTFILE.)
mysqldump
[300]
[300]
[300]
[301]
mysqldump
--tab, each table is represented in the output directory by an
statement for the table, and a
file to load the data into the table:
.txt
628
.txt
files will be written
.sql
files one line per row with tabs
.txt
supports these options:
to quote column values within double
--fields-enclosed-by
file containing the table
.txt
files will be
[300]
file with
.sql

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Mysql 5.0

Table of Contents