mysql启动参数--secure_file_priv 数据导入导出的影响
2018-01-05 17:21
851 查看
例如我们可以通过 select * from tempdb.t into outfile '/home/mysql/t.txt'; 把tempdb.t 表的数据导出来;
这个导出操作可以面临如下问题:
1、任何一个mysql用户只要它能执行上面的sql语句、并且执行成功;那么它就把文件写到了/home/mysql/目录下?
如果有一个坏人他一直导出数据到文件目录,那么总有一天会被写满的!
2、没有办法限制只能把文件导出到指定目录;
我们可以通过secure_file_priv 来完成对导入|导出的限制
secure_file_priv
1、限制mysqld 的导入 | 导出 只能发生在/tmp/目录下:
mysqld --secure_file_priv=/tmp/
2、如不指定该选项,则不对mysqld 的导入 | 导出做限制;
这个导出操作可以面临如下问题:
1、任何一个mysql用户只要它能执行上面的sql语句、并且执行成功;那么它就把文件写到了/home/mysql/目录下?
如果有一个坏人他一直导出数据到文件目录,那么总有一天会被写满的!
2、没有办法限制只能把文件导出到指定目录;
我们可以通过secure_file_priv 来完成对导入|导出的限制
secure_file_priv
1、限制mysqld 的导入 | 导出 只能发生在/tmp/目录下:
mysqld --secure_file_priv=/tmp/
2、如不指定该选项,则不对mysqld 的导入 | 导出做限制;
相关文章推荐
- MYSQL数据导出与导入,secure_file_priv参数设置
- secure_file_priv 配置项对数据导入导出的影响
- secure_file_priv 配置项对数据导入导出的影响
- MySQL导出数据遇到secure-file-priv问题的解决方法
- 详述 MySQL 导出数据遇到 secure-file-priv 的问题
- mysql 导出数据到文件 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so
- 详述 MySQL 导出数据遇到 secure-file-priv 的问题
- mysql>导出数据为txt时报错:The MySQL server is running with the --secure-file-priv option so it cannot execut
- MYSQL导入数据出现The MySQL server is running with the --secure-file-priv
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option so it cannot execute this
- mysql导出数据时提示错误1290(secure_file_priv)的解决办法
- Windows sql语句正则匹配导出数据到本地 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
- mysql导出数据时出现--secure-file-priv 问题的解决办法
- mysql导入数据 提示 The MySQL server is running with the --secure-file-priv
- MySQL中secure-file-priv 配置项对数据导入导出的影响
- ubuntu 下Mysql导入导出文件报错:ERROR 1290 (HY000): --secure-file-priv
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option
- mysql导出表到CSV文件方法及提示错误[Err] 1290 - The MySQL server is running with the --secure-file-priv option解决办法
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option 解决方法【转】
- MySQL用into outfile导出出错The MySQL server is running with the --secure-file-priv option so it cannot ex