mysql>导出数据为txt时报错:The MySQL server is running with the --secure-file-priv option so it cannot execut
2017-05-15 11:20
1181 查看
mysql> select * from anserchapp.searchApp into outfile '/home/data/searchApp/en/searchApp_cn.txt';
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
原因:
目录无权限
解决:
法1,
直接使用默认的权限文件夹(/var/lib/mysql-files/)作为导出目录即可,
mysql> select * from anserchapp.searchApp into outfile '/var/lib/mysql-files/sapp';
Query OK, 137784 rows affected (45.88 sec)
法2,
修改MySQL安装路径(/etc/mysql/)下的my.cnf,在末尾添加“secure-file-priv=路径名”这一行,重启mysql
将要通过load data infile的文件放在上面所定义的路径下进行操作即可, --- (我这里没修改成功)
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
原因:
目录无权限
解决:
法1,
直接使用默认的权限文件夹(/var/lib/mysql-files/)作为导出目录即可,
mysql> select * from anserchapp.searchApp into outfile '/var/lib/mysql-files/sapp';
Query OK, 137784 rows affected (45.88 sec)
法2,
修改MySQL安装路径(/etc/mysql/)下的my.cnf,在末尾添加“secure-file-priv=路径名”这一行,重启mysql
将要通过load data infile的文件放在上面所定义的路径下进行操作即可, --- (我这里没修改成功)
相关文章推荐
- Windows sql语句正则匹配导出数据到本地 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option so it cannot execute this
- MySQL用into outfile导出出错The MySQL server is running with the --secure-file-priv option so it cannot ex
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- [Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement]错误解决
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- mysql 导出数据到文件 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so
- 数据库权限The MySQL server is running with the --secure-file-priv option so it cannot execute this
- The MySQL server is running with the --secure-file-priv option so it cannot execute this statement解决
- The MySQL server is running with the --secure-file-priv option so it cannot execute this statement解决
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- MYSQL 5.7报错 Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it..
- mysqldump: Got error: 1290: The MySQL server is running with the --secure-file-priv option so it can
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it ...statemet
- mysql导出表到CSV文件方法及提示错误[Err] 1290 - The MySQL server is running with the --secure-file-priv option解决办法
- The MySQL server is running with the --read-only option so it cannot execute this statement