<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    462 MySQL Technical Reference for Version 4.0.3 [TERMINATED BY '\t'] [[OPTIONALLY] ENCLOSED BY ''] [ESCAPED BY '\\' ] ] [LINES TERMINATED BY '\n'] [IGNORE number LINES] [(col_name,...)] The  LOAD DATA INFILE  statement reads rows from a text le into a table at a very high speed.  If the  LOCAL  keyword is speci ed, the le is read from the client host.  If  LOCAL  is not speci ed, the le must be located on the server.  (LOCAL is available in MySQL Version 3.22.6 or later.) For  security  reasons,  when  reading  text   les  located  on  the  server,  the   les  must  either reside in the database directory or be readable by all.  Also, to use  LOAD DATA INFILE  on server les, you must have the FILE privilege on the server host. See Section 4.2.7 [Privileges provided], page 200. In MySQL 3.23.49 and MySQL 4.0.2 LOCAL will only work if you have not started mysqld with  --local-infile=0  or  if  you  have  not  enabled  your  client  to  support  LOCAL.   See Section 4.2.4 [LOAD DATA LOCAL], page 196. If you specify the keyword LOW_PRIORITY, execution of the LOAD DATA statement is delayed until no other clients are reading from the table. If you specify the keyword CONCURRENT with a MyISAM table, then other threads can retrieve data from the table while LOAD DATA is executing.  Using this option will of course a ect the performance of LOAD DATA a bit even if no other thread is using the table at the same time. Using LOCAL will be a bit slower than letting the server access the les directly, because the contents of the le must travel from the client host to the server host.  On the other hand, you do not need the FILE privilege to load local les. If you are using MySQL before Version 3.23.24 you can't read from a FIFO with LOAD DATA INFILE.  If you need to read from a FIFO (for example the output from gunzip), use  LOAD DATA LOCAL INFILE  instead. You  can  also  load  data les  by  using  the  mysqlimport  utility;  it  operates  by  sending  a LOAD DATA INFILE  command  to  the  server.   The  --local  option  causes  mysqlimport  to read data les from the client host.  You can specify the  --compress  option to get better performance over slow networks if the client and server support the compressed protocol. When locating les on the server host, the server uses the following rules:    If an absolute pathname is given, the server uses the pathname as is.    If a relative pathname with one or more leading components is given, the server searches for the le relative to the server's data directory.    If a lename with no leading components is given, the server looks for the le in the database directory of the current database. Note that these rules mean a le given as `./myfile.txt' is read from the server's data directory, whereas a le given as `myfile.txt' is read from the database directory of the current database.  For example, the following LOAD DATA statement reads the le `data.txt' from the database directory for  db1  because  db1  is the current database, even though the statement explicitly loads the le into a table in the db2 database:
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    MERCHANT ACCOUNTS
    DEDICATED SERVERS
    E-COMMERCE HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN
    REGISTRATION
    MANAGE
    YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    Corporate Info
    ABOUT US
    OUR NETWORK
    CONTACT US
    SITE MAP
    Copyright © 2002 Dyntex Group, Inc. All Rights Reserved
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide