Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

When I start the MySQL bash client, I have been starting it with --local-infile=1 so that I can import data from a .csv file.

Is there any way of doing this within MySQL Workbench?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

According to the MySQL Documentation on LOAD DATA INFILE

For security reasons, when reading text files located on the server, the files must either reside in the database directory or be readable by all. Also, to use LOAD DATA INFILE on server files, you must have the FILE privilege. See Section 6.2.1, “Privileges Provided by MySQL”. For non-LOCAL load operations, if the secure_file_priv system variable is set to a nonempty directory name, the file to be loaded must be located in that directory.

As long as you have FILE privilege, you can do this in SQL Editor

SET GLOBAL local_infile = 1;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.