/usr/bin/mysql -uroot -p******** -h******** statistics -A --default-character-set=utf8 -N -e "SELECT trim(',' from t2.white_user_group_ids),t.scene_id,t.exposure_pv FROM v_scene_statistics t LEFT JOIN windowtool.t_scene t1 ON t.scene_id = t1.id LEFT JOIN windowtool.t_activity t2 ON t1.activity_id = t2.id WHERE t.scene_channel_type = '短信渠道' AND t.zone_code = 'LN' AND t.rpt_date = '"date +%Y-%m-%d -d -1day
"' and length(trim(t2.white_user_group_ids))>1 ORDER BY t2.white_user_group_ids,t.scene_id,t.exposure_pv DESC" > /home/operationPhone/whiteuser_scene_pv/date +%Y%m%d -d -1day
.txt
-A 取消检查
-N 不输出列头
-e sql语句
最后
以上就是大方糖豆最近收集整理的关于shell脚本导出mysql数据库数据到文件的全部内容,更多相关shell脚本导出mysql数据库数据到文件内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复