I am learning MySQL and tried using a
LOAD DATA INFILE "text.txt" INTO table mytable;
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
It's working as intended. Your MySQL server has been started with --secure-file-priv option which basically limits from which directories you can load files using
LOAD DATA INFILE.
You may use
SHOW VARIABLES LIKE "secure_file_priv"; to see the directory that has been configured.
You have two options:
secure-file-priv. This must be removed from startup and cannot be modified dynamically. To do this check your MySQL start up parameters (depending on platform) and my.ini.