The following are steps that you want to import data into a table:Ĭlick Import button, choose a CSV file and click Open button It allows you to edit data before making changes. MySQL workbench provides a tool to import data into a table. Importing the file from client to a remote database server using LOAD DATA LOCAL has some security issues that you should be aware of to avoid potential security risks. The account that connects to MySQL server doesn’t need to have the FILE privilege to import the file when you use the LOCAL option. If you load a big CSV file, you will see that with the LOCAL option, it will be a little bit slower to load the file because it takes time to transfer the file to the database server. The only difference is the LOCAL option in the statement. LOAD DATA LOCAL INFILE 'c:/tmp/discounts.csv' INTO TABLE discountsįIELDS TERMINATED BY ',' ENCLOSED BY ''' LINES TERMINATED BY '\n' IGNORE 1 ROWS Code language: SQL (Structured Query Language) ( sql )