SQL语句导出数据
SELECT ... INTO OUTFILE 只能导出到服务端
例:select * from table_name into outfile '/tmp/out.txt'
报错:
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
因为secure_file_prviv 值为NULL,在my.cnf 设置,重启mysqld解决