【mysql数据库导出文件报错】The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

报错场景:使用 into outfile 导出文件时报错。

运行:

show variables like '%secure%';

查看“secure_file_priv”的值

【mysql数据库报错】The MySQL server is running with the --secure-file-priv option so it

改成在此路径下就可以:

select * from gdzq_gjk.o_ls_xgj_zxjqtj into outfile '/var/lib/mysql-files/test.txt' fields terminated by "," optionally enclosed by '"';

 

若想更换导出路径,则可以修改配置文件:

 

【mysql数据库报错】The MySQL server is running with the --secure-file-priv option so it

 

相关文章:

  • 2021-09-26
  • 2021-11-06
  • 2021-04-27
  • 2022-12-23
  • 2021-09-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-12
  • 2021-08-10
  • 2022-12-23
  • 2021-06-26
相关资源
相似解决方案