mysql load data infileインポートの様々な問題
2102 ワード
1.linux (mysql 5.6.36)
a> ( , secure_file_priv NULL , my.ini )
+------------------+------------------------+
| Variable_name | Value |
+------------------+------------------------+
| secure_file_priv | /home/webedit/hq/data/ |
+------------------+------------------------+
: :LOAD DATA INFILE '/home/webedit/hq/data/article_content.csv' INTO TABLE article_content_record character set utf8 fields terminated by ',' enclosed by '"';
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
b> : linux
SHOW VARIABLES LIKE "%tmp%";
+----------------------------+----------+
| Variable_name | Value |
+----------------------------+----------+
| default_tmp_storage_engine | InnoDB |
| innodb_tmpdir | |
| max_tmp_tables | 32 |
| slave_load_tmpdir | /tmp |
| tmp_table_size | 16777216 |
| tmpdir | /tmp |
+----------------------------+----------+
tmpdir Mysql /tmp
mv article_content.csv /tmp
LOAD DATA INFILE '/tmp/article_content.csv' INTO TABLE article_content_record character set utf8 fields terminated by ',' enclosed by '"';