Select Into file
mysql -h 主机 -u 用户 -p密码 -P端口 -D库 -Bse “select id,type from table;” > /var/sql.txt
Insert from file
local data offloading is disabled by default , and for the file to be read into the database, it must be enabled by starting mysql using
mysql -uroot -ppassword --local-infile database
# move the file into the database directory
mv sql.txt to /var/lib/mysql/database/
mysql> Load Data InFile 'sql.txt' Into Table `table`;
To be continue...