fix MySQL import csv file ERROR 13 (HY000): Can't get stat of /path/file.csv (Errcode: 2)
fix such http://dba.stackexchange.com/questions/55960/mysql-import-csv-file-error-13-hy000-cant-get-stat-of-path-file-csv-errcod
This commit is contained in:
parent
884f6e9c76
commit
f6e44ddd73
|
@ -53,8 +53,8 @@ restore()
|
|||
|
||||
if [ -f "$PATH/$TABLE.txt" ]; then
|
||||
f_log "+ $TABLE"
|
||||
/usr/bin/mysql --defaults-extra-file=$MYCNF $BDD -e "SET foreign_key_checks = 0;
|
||||
LOAD DATA INFILE '$PATH/$TABLE.txt'
|
||||
/usr/bin/mysql --local-infile --defaults-extra-file=$MYCNF $BDD -e "SET foreign_key_checks = 0;
|
||||
LOAD DATA LOCAL INFILE '$PATH/$TABLE.txt'
|
||||
INTO TABLE $TABLE;
|
||||
SET foreign_key_checks = 1;"
|
||||
|
||||
|
|
Loading…
Reference in a new issue