MYSQL dataload restrictions

load data infile ‘var/lib/mysql/part-00000’ INTO Table categories;

While loading data to directly in mysql database from file on VM Sandbox, I get this error message.

mysql server is running with the secure_file_priv option so it cannot execute statement.

Where can we configure the variable secure_file_priv to be able remove the restrictions on the file path from which we can load the to db?

Try this command -

load data local infile ‘var/lib/mysql/part-00000’ INTO Table categories;

Yes tried that option as well, same error message. Looks like we need to update a particular config file with that variable. :frowning:

Solved: /var/lib/mysql-files is the path to be used as location to load the files.

1 Like