Databases Reference
In-Depth Information
This screen shows the exact
LOAD
DATA
LOCAL
INFILE
statement used. Here is what
has just happened in detail:
•
•
We chose
authors.csv
.
The contents of this file were transferred over HTTP and received by the
web server.
The PHP component inside the web server saved this file in a work directory
(here
/mnt/san/tmp/
) and gave it a temporary name,
phpFI8km2
.
phpMyAdmin informed of the location of this working file, built a
LOAD
DATA LOCAL INFILE
command and sent it to MySQL.
The MySQL server read and loaded the contents of the file into our target
table; it then returned the number of affected rows (2), which phpMyAdmin
displayed in the results page.
•
•
•
Web Server Upload Directories
To get around cases where uploads are completely disabled by a web server's PHP
configuration or where upload limits are too small, phpMyAdmin can read upload
files from a special directory located on the web server's file system. This mechanism
is applicable for SQL and CSV imports.
We first specify the directory name of our choice in the
$cfg['UploadDir']
parameter; for example,
'./upload'
. We can also use the
%u
string, as described in
Chapter 7, to represent the user's name.
Now, let's go back to the
SQL
sub-page and see what happens:
Search WWH ::
Custom Search