About mysql load data local infile support Question 1. run The following command: ERROR 1148 (42000): The used command is not allowed with this MySQL version. Solution: first go to MYSQL and check that version: 5.1 or later is supported. Mysql>
The use of the following methods:
The code is as follows
Copy Code
Mysql>load data local infile "d:/ab.txt" into table Mytbl (name,age);
How to load data with back slash (backslash) "" data
Because if you do
Select INTO outfile usageIn MySQL, you can use SELECT ... The into OUTFILE statement exports the contents of the table as a text file.SELECT [column name] FROM table [WHERE statement] into OUTFILE ' target file ' [OPTION]; The "option"
Use LOAD Statement Bulk Data EntryGrammar:LOADDATA[low_priority | CONCURRENT] [LOCAL]INFILE'file_name' [REPLACE | IGNORE] into TABLETbl_name[CHARACTER SET charset_name] [{fields | COLUMNS} [TERMINATED by ' string ']
LOAD DATA [low_priority] [LOCAL] INFILE ' file_name.txt ' [REPLACE | IGNORE]Into TABLE tbl_name[Fields[TERMINATED by ' \ t '][Optionally] Enclosed by "][escaped by ' \ \ '][LINES TERMINATED by ' \ n '][IGNORE number LINES][(Col_name,...)]Custom
When using MySQL, the load data infile is often used to import, and sometimes a format conversion problem is encountered when a column of type date is encountered:First create a simple people table with name, birthday, age three fields:mysql> create
Http://blog.chinaunix.net/u/29134/showart_1069838.html
My articles are generally easy to understand and won't be so in-depth that it is hard for everyone to understand. (In fact, I am not at the same level)
Load data infile has always been
First create a table
Use test;
Create Table tabletest (
'Id' mediumint (8) default '0 ',
'Name' varchar (100) default''
) Type = MyISAM;
Import data to a data tableLoad data infile 'C:/data.txt 'into Table 'tabletest'
Commonly used:Load
First create a table
Use Test;
Create Table Tabletest (
' ID ' Mediumint (8) Default ' 0 ',
' Name ' varchar default '
) Type=myisam;
Import data to a datasheet
Load Data InFile ' c:/data.txt ' into Table ' tabletest '
Commonly used as
We all know that when a large volume of data is inserted into MySQL,MySQL uses load data local infile to import data from a file faster than the insert Statement, which is about 20 times faster.However, this method has a disadvantage: before
I want to execute MySQL's load data local infile statement in a PHP script, I use the PDO link database, the data does not write, how to use, solve
Reply content:
I want to execute MySQL's load data local infile statement in a PHP script, I use
Mysql LoadData the Use in the database, the most common way to write data is through Sqlinsert to write, and the other is to restore the database through backup files, this backup file in MySQL is SQL script, actually executed in BULK INSERT
This is the official manual for mariadb: The translation of LOAD DATA infile.Original:https://mariadb.com/kb/en/load-data-infile/I submit it to MARIADB official manual:https://mariadb.com/kb/zh-cn/load-data-infile/Back to Linux series article
Java uses mysql load data local infile to import DATA in large batches to MySQL, mysqlinfile
Use of Mysql load data
In a database, the most common way to write data is to write data through SQL insert, and recover the database through backup files.
Mysql outfile infile import and export data export [plain] SELECT * into outfile '/tmp/jason.txt 'fields TERMINATED by', 'From test. jason; or [plain] SELECT * into outfile '/tmp/jason1.txt' fields terminated by ', 'optionally enclosed by' "'Lines
Mysql outfile infile import and export data (append mysqldump) Export [plain] SELECT * into outfile '/tmp/jason.txt 'fields TERMINATED by', 'From test. jason; or [plain] SELECT * into outfile '/tmp/jason1.txt' fields terminated by ', 'optionally
MySQL load data infile parsing, mysqlinfile
Load data [LOW_PRIORITY] [LOCAL] INFILE'file_name.txt '[REPLACE | IGNORE]
Into table tbl_name[FIELDS[Terminated by '\ T'][OPTIONALLY] enclosed by ''][Escaped by '\'][Lines terminated by '\ n'][IGNORE
Let's take a look at the MySQL Load data InFile outfile Import Export Oh, this is the way we run the Windows Cmd.exe and then use the following statement in the DOS command method.
Load Data InFile The opposite isSelect * from ' tabletest ' into
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.