如何将数据导出到Mysql Server 8.0上的csv文件

时间:2019-03-23 10:04:37

标签: mysql

我正在Windows7上运行Mysql server 8.0。我想将数据导出到csv文件。我检查了secure_file_priv变量。它是“'C:/ Program Files / MySQL / MySQL Server 8.0 / Uploads”。

但是当我通过这些语句导出时。它显示错误:

use classicmodels;

SELECT * FROM employees INTO OUTFILE 'C:/Program Files/MySQL/MySQL Server 8.0/Uploads/data.csv' 
         COLUMNS TERMINATED BY ','
         LINES TERMINATED BY '\r\n';

enter image description here

0 个答案:

没有答案