【问题标题】:mysqlimport from --secure-file-priv folder, but still got error从 --secure-file-priv 文件夹导入 mysqlimport,但仍然出现错误
【发布时间】:2018-07-05 23:51:21
【问题描述】:

我已将 --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

我应该怎么做才能解决这个问题?

【问题讨论】:

  • e:之后加一个反斜杠?
  • @fancyPants 感谢您的想法。可惜不行。

标签: mysql mysqlimport


【解决方案1】:

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

安全文件隐私

secure-file-priv="F:/directory"

【讨论】:

    猜你喜欢
    • 2016-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-14
    • 2017-06-09
    • 1970-01-01
    • 2019-08-07
    • 2020-11-12
    相关资源
    最近更新 更多