- 论坛徽章:
- 0
|
在数据库中,load data infile 和load data local infile都可以导入本地的数据,而mysql5.0版本默认支持上述模式。
- mysql> load data infile 'sqlfile.txt' into table users fields terminated by ',';
- mysql> load data local infile 'sqlfile.txt' into table users fields terminated by ',';
复制代码
上述两者的达到的效果是一样的,目前疑问是是,在启动mysql
加参数可以限制使用load data local infile,
例如:
- #/usr/local/mysql/bin/mysqld_safe --user=mysql --local-infile=0 &
- mysql> load data local infile 'sqlfile.txt' into table users fields terminated by ',';
- ERROR 1148 (42000): The used command is not allowed with this MySQL version
复制代码
对于load data infile ,应该如何禁止使用?谢谢告知? |
|