1 语句:
load data infile 'd:/job_hunting_ls.txt' into table job_hunting(keyword, contact, phone_no, content, call_time, adopt, region_part1, region_part2, region_part3);
出错:
1290- The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
语句修改为:
load data local infile 'd:/job_hunting_ls.txt' into table job_hunting(keyword, contact, phone_no, content, call_time, adopt, region_part1, region_part2, region_part3);
2 在update表格时出错:
若提示是在安全模式下不能修改
则:SET SQL_SAFE_UPDATES=0;
3 语句:
select distinct * from keyword into outfile 'd:/ls_keyword_1.txt';
导出时仍然出错,错误同1.
根本解决办法:
停了mysql的服务。 在类似的这个位置C:\ProgramData\MySQL\MySQL Server 5.6\my.ini, 找到INI文件。复制一份作为备份。 编辑此文件。将里面的类似的一行 secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.6/Uploads" 删除。 启动mysql服务。(ps:mysql的启动与停止是在运行中输入services.msc。然后在服务中停止启动MYSQL57)