Mega Code Archive

 
Categories / MySQL / Table Index
 

-d option specifies a field delimiter of

columns from the third to the end of the line. mysql> mysql> CREATE TABLE passwd     -> (     ->     account CHAR(8), # login name     ->     uid INT, # user ID     ->     gid INT, # group ID     ->     gecos CHAR(60), # name, phone, office, etc.     ->     directory CHAR(60), # home directory     ->     shell CHAR(60) # command interpreter     -> ); Query OK, 0 rows affected (0.01 sec) mysql> mysql> LOAD DATA LOCAL INFILE 'passwd.txt' INTO TABLE passwd     -> FIELDS TERMINATED BY ':'; ERROR 2 (HY000): File 'passwd.txt' not found (Errcode: 2) mysql> mysql> drop table passwd; Query OK, 0 rows affected (0.00 sec)