Windows安装MYSQL
转自:https://blog.csdn.net/u013235478/article/details/50623693
mysql 查询出的数据导出到文件
命令执行mysql 语句
1. cd C:\install\mysql-5.7.23-win32\bin
2. mysql -uroot -p123
1. cd C:\install\mysql-5.7.23-win32\bin
2. mysql -uroot -p123
-u后面是用户名,-p后面是密码
3. show variables like '%secure%';
3. show variables like '%secure%';
查看 secure-file-priv 当前的值是什么,文件要建在该文件夹下,如果要自定义则在my.ini配置文件中修改
![](https://img2018.cnblogs.com/blog/1385248/201811/1385248-20181108194711327-1742163.png)
4. select USER_ID from spro_chart.java_user into outfile 'C:/install/2.txt' fields terminated by '\t' lines terminated by '\r\n'