>mysql 下执行命令:
loaddatainfile‘/mnt/share/patch_export.csv‘ //csv file path
intotable`tablename`
fieldsterminatedby‘,‘optionallyenclosedby‘"‘escapedby‘"‘
linesterminatedby‘\n‘;
如果遇到权限问题的error,可以在连接mysql时加入参数--local-infile
即mysql -uroot -p databasename --local-infile
时间: 2024-12-09 05:44:58