0

I tried to import the data from excel to MYSQL by using the following command:

  load data local infile "filepath" into table mytab;

But this command is work for import the data from text file not for csv file or xlsx. I want to import the data directly from excel to MYSQL.

3 Answers 3

1

check following, see the seperator in your csv file and make sure you provide the correct one in command. Referance Link

Sign up to request clarification or add additional context in comments.

Comments

0

You need to convert your Excel sheet into a CSV file, or use MySQL for Excel to help with the process.

Comments

0
load data local infile "filepath" into table mytab fields terminated by ';' enclosed by '"' lines terminated by '\r\n';

Should be the command you need, but you should export to csv first.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.