secure_file_priv 配置项对数据导入导出的影响
2017-03-26 10:03
405 查看
secure_file_priv mysqld 用这个配置项来完成对数据导入导出的限制、
例如我们可以通过 select * from tempdb.t into outfile '/home/mysql/t.txt'; 把tempdb.t 表的数据导出来;这个导出操作可以面临如下问题
1、任何一个mysql用户只要它能执行上面的sql语句、并且执行成功;那么它就把文件写到了/home/mysql/目录下?
如果有一个坏人他一直导出数据到文件目录,那么总有一天会被写满的!
2、没有办法限制只能把文件导出到/tmp/目录
我们可以通过secure_file_priv 来完成对导入|导出的限制
secure_file_priv
1、限制mysqld 不允许导入 | 导出
mysqld --secure_file_prive=null
2、限制mysqld 的导入 | 导出 只能发生在/tmp/目录下
mysqld --secure_file_priv=/tmp/
3、不对mysqld 的导入 | 导出做限制
例如我们可以通过 select * from tempdb.t into outfile '/home/mysql/t.txt'; 把tempdb.t 表的数据导出来;这个导出操作可以面临如下问题
1、任何一个mysql用户只要它能执行上面的sql语句、并且执行成功;那么它就把文件写到了/home/mysql/目录下?
如果有一个坏人他一直导出数据到文件目录,那么总有一天会被写满的!
2、没有办法限制只能把文件导出到/tmp/目录
我们可以通过secure_file_priv 来完成对导入|导出的限制
secure_file_priv
1、限制mysqld 不允许导入 | 导出
mysqld --secure_file_prive=null
2、限制mysqld 的导入 | 导出 只能发生在/tmp/目录下
mysqld --secure_file_priv=/tmp/
3、不对mysqld 的导入 | 导出做限制
cat /etc/my.cnf [mysqld] secure_file_priv
相关文章推荐
- secure_file_priv 配置项对数据导入导出的影响
- mysql启动参数--secure_file_priv 数据导入导出的影响
- MySQL中secure-file-priv 配置项对数据导入导出的影响
- MYSQL数据导出与导入,secure_file_priv参数设置
- mysql5.7导出数据提示--secure-file-priv选项问题的解决方法
- MySQL导出数据遇到secure-file-priv问题的解决方法
- Windows sql语句正则匹配导出数据到本地 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
- mysql导出数据时提示错误1290(secure_file_priv)的解决办法
- mysql导入数据 提示 The MySQL server is running with the --secure-file-priv
- MYSQL导入数据出现The MySQL server is running with the --secure-file-priv
- mysql 导出数据到文件 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so
- mysql导出数据时出现--secure-file-priv 问题的解决办法
- ubuntu 下Mysql导入导出文件报错:ERROR 1290 (HY000): --secure-file-priv
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option so it cannot execute this
- 详述 MySQL 导出数据遇到 secure-file-priv 的问题
- mysql>导出数据为txt时报错:The MySQL server is running with the --secure-file-priv option so it cannot execut
- 详述 MySQL 导出数据遇到 secure-file-priv 的问题
- 导出/导入数据时不会对统计信息产生影响
- 快速导入导出Oracle数据demo(sqlldr、UTL_FILE)
- mysql使用load file导出导入[大]批量数据