The LOAD DATA statement can load a file that is located on the server host, or it can load a file that is located on the client host when the LOCAL keyword is specified.
In a Web server environment where the clients are connecting from a Web server, a user could use LOAD DATA LOCAL to read any files that the Web server process has read access to (assuming that a user could run any command against the SQL server). In this environment, the client with respect to the MySQL server actually is the Web server, not the remote program being run by the user who connects to the Web server. Attacker can take advantage of this SQL injection via PHP/perl etc.
Open my.cnf file:
# vi my.cnf
Append following line [mysqld] section
Save and restart MySQL server:
# /etc/init.d/mysql restart