mysql -u [youruser] -h [youraddress] -p [yourpassword] [yourdatabase] --local-infile=1 -e "[yourcmd]"
example:
mysql -uroot -p123456 book --local-infile=1 -e "load data local infile '/home/hp/test.txt'into table test fields terminated by ' ';"
mysql -u [youruser] -h [youraddress] -p [yourpassword] [yourdatabase] --local-infile=1 -e "[yourcmd]"
example:
mysql -uroot -p123456 book --local-infile=1 -e "load data local infile '/home/hp/test.txt'into table test fields terminated by ' ';"
转载于:https://www.cnblogs.com/purples/p/3598001.html