把mysql的数据导出成txt

把mysql的数据导出成txt

select a from b  into outfile '/sqlfile/a.txt';

my.ini里需要设置secure_file_priv = d:/sqlfile

Query OK, 2kw rows affected (1 min 33.86 sec)

 速度还是挺快的;

 如果导出到其他路径,会出现:

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

提示;

猜你喜欢

转载自www.cnblogs.com/stono/p/9177295.html