file权限指的是是否能够对系统的文件读取和写操作.
拥有file权限才可以执行 select ..into outfile和load data infile…操作,
但是不要把file, process, super权限授予管理员以外的账号,这样存在严重的安全隐患。 下面简单做个试验:
1、创建环境
mysql> CREATE USER 'filetest'@'localhost' IDENTIFIED BY 'mypass';
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT select ON test.* TO 'filetest'@'localhost';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT select ON test.* TO 'filetest'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE TABLE tab1(
-> aa varchar(50),
-> bb varchar(50)
-> );
Query OK, 0 rows affected (0.02 sec)
mys