20. Import data

1.load data
In MySQL, you can use the load data statement to import the text file data into the corresponding database table, and the load data statement can be regarded as the reverse operation of select...into outfile.

load data infile pathName
into table tableName
character set utf8 fields terminated by ','
enclosed by '"'
lines terminated by '\r\n';

2. Source
In MySQL, you can use the source command to import larger sql files. The source command can import sql files backed up using mysqldump.

source pathName

Insert picture description here

Guess you like

Origin blog.csdn.net/Jgx1214/article/details/107496275