Home >Database >Mysql Tutorial >How to Work Around the \'The used command is not allowed with this MySQL version\' Error in LOAD DATA LOCAL INFILE?
Workaround for "The used command is not allowed with this MySQL version" Error in LOAD DATA LOCAL INFILE
The LOAD DATA LOCAL INFILE command provides a convenient way to import data from a local CSV file directly into a MySQL database. However, in certain configurations, users may encounter the following error:
The used command is not allowed with this MySQL version
This error suggests that the server variable local_infile is disabled, which prevents the execution of LOAD DATA LOCAL INFILE statements.
To work around this issue without modifying server settings, consider the following steps:
mysql -u USER -p --local-infile=1 DATABASE
If this workaround is successful, you will need to either modify the server configuration to permanently enable local infile imports or reinstall MySQL with the --local-infile option.
Additional Notes:
The above is the detailed content of How to Work Around the \'The used command is not allowed with this MySQL version\' Error in LOAD DATA LOCAL INFILE?. For more information, please follow other related articles on the PHP Chinese website!