mysql -uroot -p sakesi -e "SELECT id from wp_posts INTO OUTFILE'/var/www/html/id/id.txt'"注册最好先建个文件夹id,然后设置这个文件可写入 chmod -R 755 id 如何要导出两个字段呢:id和name两个字段下的内容:
mysql -uroot -p sakesi -e "SELECT id,name from wp_posts INTO OUTFILE'/var/www/html/id/id.txt'"