SELECT empno, hiredate, salary, number_to_string2(salary) INTO OUTFILE "C:/Users/singh/Desktop/emp.csv"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM emp3;
我试过这个,但是我收到一条错误,说“错误代码:1290。MySQL服务器正在运行--secure-file-priv选项,因此它无法执行此语句0.000秒”
所以我在my.ini文件中检查了secure-file-priv,并对其进行了评论。我重新启动服务器并运行命令:
SHOW VARIABLES LIKE "secure_file_priv";
显示:
Variable_name Value
secure_file_priv NULL
当我再次尝试写入文件时,它会显示相同的错误。 我该如何解决这个问题?