How to Import CSV File to Mysql? Error 1295

Asked

Viewed 521 times

0

How to import a CSV file to Mysql?
I get error code 1295:

ERROR 1295: 1295: This command is not supported in the Prepared statement Protocol yet SQL Statement

I sent the command:

LOAD DATA LOCAL INFILE 'caminho_do_arquivo' INTO TABLE tabela CHARACTER SET UTF8;
  • Post a few lines of your file.

  • What is the version of your Mysql?

1 answer

0

Many mysql graphics clients have very simple to use import dialogs(windows) for this kind of thing.
What I use for is work Heidisql.
It provides a graphical interface to build the LOAD DATA command;
You can reuse it programmatically later.

I know it is not the case but check the file formatting . csv before importing it.

To use Heidisql for a look at this link in English that has images of an import example of a file . csv

Browser other questions tagged

You are not signed in. Login or sign up in order to post.