Mysqlimport:
I say this we still have a better understanding of the world view methodology and more accurate grasp. Data import there are two parts to call
The first part: target object--who are we going to give the data to (Mysqlimport's target is naturally the table in the MySQL database.)
Part II: Data Source-The source of our data (the example below is only a text file)
That is to say, I can give the Mysqlimport order preliminary written mysqlimport-uusername-p databasename TableName filepath
DatabaseName indicates the name of the target database
TableName indicates the name of the target table
The source of the filename data
Read here is not feel mysqlimport know almost! It's not really yet. We still have an agreement not to say.
Mysqlimport the table name in the contract database is the same as the file name, which means we mysqlimport the order
mysqlimport-uusername-p DatabaseName FilePath
See there is no more tablename because it will be taken from the filepath.
Example:
Data Source: D:\t.txt
Target: T table in test database
Statement:
Mysqlimport-uroot-p --fields-terminated-by=, test D:\t.txt
Operation Result:
--------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------
The parameters to be mysqlimport in several comparisons
--fields-terminated-by=, #这个表示各个列之间用 ', ' separate.
--fields-enclosed-by= "#这个说明各个值是用 '" ' cause.
MySQL mysqlimport import data from TXT file to MySQL database