WL#6782: Limit the scope of the FILE privilege in the default installation

Affects: Server-5.7   —   Status: Complete

FILE privilege provides ability to read and write files on the server host to a
user. Such user can read any file on server host that is either world-readable
or readable by MySQL server and write files through commands like SELECT ...
INTO... . In order to limit the scope of FILE privilege, MySQL provides
--secure-file-priv option which, when set to point to a directory, restricts
read and write operation using FILE privilege to that directory.
https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-file-priv

This options defaults NULL which essentially allows users with FILE privilege to
create files at any location where MySQL server has write permission.

To provide a more secure installation, scope of FILE privilege should be
restricted using a secure default value for --secure-file-priv. In addition,
server should warn users of insecure configuration for --secure-file-priv at
start-up time. This worklog will track these changes.