

Which might be different from the formats of the client software that you were using.

FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' Those formats are optional and the value would be like below when they are omitted. The syntax for the COLUMNS and LINES clauses is the same for both SELECT INTO OUTFILE and LOAD DATA INFLE.

They mentioned a few approaches to work around that limit, like `mysql -e “select from.” > mylocalfile`, which requires the mysql client to be installed on the client side, which is the equivalent of exporting the select results in my sequel pro.īeyond the discussion about if you can read/write SQL result to either remote/local filesystem, there is a format clause where you might need to pay attention to. INTO OUTFILE since there is no way to write a path to the file relative to the server host’s file system.” “If you want to create the resulting file on some other host than the server host, you normally cannot use SELECT. In another way, you can only load the file to the remote server, and if you don’t have access to the filesystem, then you can not access the file. However, when you use SELECT INTO OUTFILE, there is no option like SELECT INTO LOCAL OUTFILE where you can specify to write the file into local. When you use LOAD DATA INFILE, you can either load from a file resides on the same box as MySQL server, and also, you can specify the LOCAL INFILE so you can load a file from client file system to load the data into a table on the remote side. LOAD DATA INFILE is the complementary of SELECT INTO OUTFILE.
