I\'m not quite sure a similar question to this was closed by I\'m trying to execute the following MySQL program.
mysql -e \"load data local infile \\
\'/tmp
local-infile
needs to enabled on both the server and the client. You can accomplish this by adding local-infile = 1
to the appropriate section in each end's my.cnf
(Unix) or my.ini
(Windows) file. For example, on the client:
[client]
local-infile = 1
You can also enable this at runtime on the server by setting the system variable local_infile
:
SET GLOBAL local_infile=1;
However, you still need to enable it on the client. You can do this at runtime by adding a command-line parameter to the mysql
command:
mysql --local-infile=1 ...
If you're using Amazon Web Services RDS, you can configure the server setting by editing or creating a Parameter Group. Look for the local_infile
parameter. You may need to restart your server after applying the changes.