file权限

为用户赋予file权限时不必指明该权限专门赋予哪一个schema,若指明schema,则会报错。
 
mysql> grant file on test_db.* to "test_user"@"%";
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
 
若在赋予file权限时不对schema作限制,则可以赋权成功。
mysql> grant file on *.* to "test_user"@"%";
Query OK, 0 rows affected (0.00 sec)
原文地址:https://www.cnblogs.com/liang545621/p/12606822.html