从--secure-file-priv文件夹导入mysqlimport,但仍然出现错误

时间:2018-07-05 23:51:22

标签: mysql mysqlimport

我将--secure-file-priv设置如下:

mysql> show variables like '%secure%';
+--------------------------+----------+
| Variable_name            | Value    |
+--------------------------+----------+
| require_secure_transport | OFF      |
| secure_auth              | ON       |
| secure_file_priv         | E:\test\ |
+--------------------------+----------+

但是我遇到了这样的错误:

D:\Tool\mysql-5.7.17-win32\bin>mysqlimport -u root -p my_test tb < e:test/new/outfile.sql
Enter password:
mysqlimport: Error: 1290, The MySQL server is running with the --secure-file-priv option so it cannot execute this statement, when using table: tb

另一个错误:

D:\Tool\mysql-5.7.17-win32\bin>mysqlimport -u root -p my_test tb < e:test\new\outfile.sql
Enter password:
mysqlimport: Error: 1290, The MySQL server is running with the --secure-file-priv option so it cannot execute this statement, when using table: tb

我该怎么办?

1 个答案:

答案 0 :(得分:0)

事实是,在my.ini中,您没有指定正确的目录

保护文件私密。

secure-file-priv =“ F:/目录”