因为使用命令查询数据的时候数据太多,导致不能完全看到,只好导出到指定的文本,却提示:ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement,接下来吾爱编程为大家介绍一下解决方法,有需要的小伙伴可以参考一下:
1、导出命令:
SELECT CONCAT('https://bbs.itbiancheng.cn/forum.php?mod=redirect&goto=findpost&ptid=', `tid`,'&pid=',`pid`) FROM `pre_forum_post` where message like '%大陆%' into outfile '/home/wwwlogs/dlu.txt' CHARACTER SET gbk;
2、错误提示:
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
3、解决方法:
(1)、查看secure-file-priv设置:
NULL值表示数据不能导出
(2)、修改my.ini文件配置:
secure-file-priv = /home/wwwlogs
(3)、重启mysql服务,然后查看对应设置是否已经更改:
service mysql restart