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 ‘ ‘;"
2021-12-16 04:49:36
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 ‘ ‘;"
下一篇:数据库存储过程缺点总结