请按照步骤导出,否则可能会报错:

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

第一步:首先进入数据库

mysql> show variables like '%secure%';
+--------------------------+-----------------------+
| Variable_name | Value |
+--------------------------+-----------------------+
| require_secure_transport | OFF |
| secure_auth | ON |
| secure_file_priv | /var/lib/mysql-files/ |
+--------------------------+-----------------------+
3 rows in set (0.00 sec)

secure_file_priv为导出路径,必须为这个,后边加文件名;

第二步:导出

mysql> select idfa from firstapp_report where day_time between '2018-12-13 00:00:00.028986' and '2018-12-17 23:59:50.512468' into outfile '/var/lib/mysql-files/result.txt' lines terminated by '\r\n';;
Query OK, 86329 rows affected (0.09 sec)
into outfile “c:/data_out.txt” (输出的文件路径)
lines terminated by “\r\n” (每一行都换行)

第三步:进入导出的文件路径

root@vmware01:/var/lib/mysql-files# ls
result.txt

# 查询某天的数据

select count(id) from firstapp_report where callback_result_text='success' and offer_id=25 and date_format(day_time,"%Y-%m-%d")="2018-12-18";

最新文章

  1. HTTP 错误500.19 -Internal Server Error 错误代码 0x80070021
  2. VIM的一些操作小技巧
  3. [问题2014A07] 解答
  4. 模拟MessageBox
  5. PRML读书会第一章 Introduction(机器学习基本概念、学习理论、模型选择、维灾等)
  6. SqlParameter中的size
  7. 使用 WPF 实现所见即所得HTML编辑器
  8. [转载]The Island Castaway mac版解锁
  9. Java入门练习之四则运算
  10. Angular4.0引入第三方框架,eg: bootstrap、jquery
  11. Tarjan 强连通分量 及 双联通分量(求割点,割边)
  12. 福大软工1816 · 第三次作业 - 结对项目Salty Fish原型图
  13. (转载)Peter Norvig:十年学会编程
  14. 6 Multi-Cloud Architecture Designs for an Effective Cloud
  15. JQ 弹出层全屏
  16. 超星网站cc++
  17. python运行错误---TabError: Inconsistent use of tabs and spaces in indentation
  18. HBTS(HBOI) 2019 真实退役记
  19. C++学习笔记--异常简介
  20. spring配置文件中导入约束的详细步骤

热门文章

  1. 解决当打开Unity时 提示项目已经打开,而自己之前并没有打开过(可能之前异常关闭)的问题
  2. 【报错】IntelliJ IDEA中绿色注释扫描飘红报错解决
  3. MySQL不容忽视SQL_MODE的设置
  4. struct sockaddr与struct sockaddr_in ,struct sockaddr_un的区别和联系
  5. linux下的程序调试方法汇总
  6. 学习环境配置:Manjaro、MSYS2以及常见软件
  7. 多线程设计模式 - Future模式
  8. sublime 中设置pylint
  9. C++ primer分章节快速回顾
  10. python 集合互相转换