Prev | Current Page 142 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

We then click Go.
If all goes well, we see the confirmation screen:
This screen shows the exact LOAD DATA LOCAL INFILE statement used. Here is what
has just happened in detail:
We chose author.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.
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.
??? ??? ??? ??? ???
Importing Structure and Data
[ 148 ]
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 Import sub-page and see what happens:
This error message is expected, as the directory does not exist.


Pages:
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154