mysql查询结果导出数据

  1. Mysql数据库从文件导入或导出到文件,提示The MySQL server is running with the –secure-file-priv option so it cannot execute this statement

    • 解决办法1

      1. mysql命令窗口输入: show variables like ‘%secure%’;
        mysql查询结果导出数据
      2. 导出路径为上图的的路径,该路径为mysql默认的导出路径: select * from tablename into outfile’允许路径/test.xls’
        mysql查询结果导出数据
    • 解决办法2: 修改my.ini配置,使得可以导出到任意路径

      1、打开my.ini,修改secure-file-priv值
      mysql查询结果导出数据
      删除secure-file-priv前面路径配置,修改为 secure-file-priv=
      mysql查询结果导出数据
      2、重启 Mysql56服务
      mysql查询结果导出数据
      3 这样就能导出路径不受限了
      mysql查询结果导出数据

参考

[1]: http://blog.sina.com.cn/s/blog_59bba95d0102wspc.html 解决mysql数据导入导出提示secure-file-priv option问题
[2]: https://blog.csdn.net/h12kjgj/article/details/77187304 MYSQL导出数据出现The MySQL server is running with the –secure-file-priv option
[3]: https://www.cnblogs.com/sophia194910/p/5541842.html net start mysql提示:服务名无效

相关文章:

  • 2021-06-19
  • 2021-12-02
  • 2021-06-27
  • 2022-01-10
  • 2021-12-30
  • 2021-06-18
  • 2022-03-01
  • 2021-07-06
猜你喜欢
  • 2022-01-25
  • 2021-12-02
  • 2021-11-30
  • 2021-06-18
  • 2021-12-02
  • 2021-12-02
  • 2022-01-31
相关资源
相似解决方案