fix MySQL import csv file ERROR 13 (HY000): Can't get stat of /path/file.csv (Errcode: 2)
This commit is contained in:
parent
f4b3fc8bce
commit
c2e87acc5b
|
@ -111,8 +111,8 @@ restore()
|
|||
|
||||
if [ -f "$DIR_PWD/$BDD/$TABLE.txt" ]; then
|
||||
f_log "+ $TABLE"
|
||||
mysql --defaults-extra-file=$MYCNF $BDD -e "SET foreign_key_checks = 0;
|
||||
LOAD DATA INFILE '$DIR_PWD/$BDD/$TABLE.txt'
|
||||
mysql --defaults-extra-file=$MYCNF $BDD --local-infile -e "SET foreign_key_checks = 0;
|
||||
LOAD DATA LOCAL INFILE '$DIR_PWD/$BDD/$TABLE.txt'
|
||||
INTO TABLE $TABLE;
|
||||
SET foreign_key_checks = 1;"
|
||||
|
||||
|
@ -178,4 +178,4 @@ done
|
|||
#shift "$((OPTIND - 1))"
|
||||
|
||||
# === AUTORUN ===
|
||||
restore
|
||||
restore
|
||||
|
|
Loading…
Reference in a new issue