Prev | Current Page 138 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

The default value is utf8, but if we know that the
import file was created with another character set, we should specify it here.
Since version 2.9, there is a SQL compatibility mode selector available at import
time. This mode should be adjusted to match the actual data that we are about to
import, according to the type of server where the data was previously exported.
To start the import, we click Go:
The importation proceeds and we receive a message: Import has been successfully
finished, 2 queries executed. We can browse our newly created tables to confirm the
success of the import operation.
The file could be imported in a different database or even a MySQL server for testing.
Importing CSV Files
In this section, we will examine how to import CSV files. There are two possible
methods: CSV and CSV using LOAD DATA. The first method is implemented
internally by phpMyAdmin and is the recommended one for its simplicity. With the
second method, phpMyAdmin receives the file and passes it to MySQL to be loaded; in
theory, this method should be faster, but it has more requirements due to MySQL itself.
Differences between SQL and CSV Formats
There are some differences between these two formats. The CSV file format contains
data only, so we must already have an existing table in place. This table does not
need to have the same structure as the original table (from which the data comes);
the Column names dialog enables us to choose which columns are affected in the
target table.


Pages:
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150