I'm trying to import
LOAD DATA LOCAL INFILE "/home/frederic/cowtest.csv"
INTO TABLE cow_db1 FIELDS TERMINATED BY ","
ENCLOSED BY '"' LINES TERMINATED BY '\n'
IGNORE 1 LINES (state_abb, c_code, state_name);
I get: ERROR 1148 (42000): The used command is not allowed with this MySQL version
I connected mysql with M-x sql-mysql
and
User = root
Password = .....
Database =
Server = localhost
But running directly from the shell after
mysql -h localhost -u root -p --local-infile
does not return the error but
Query OK, 243 rows affected (0.05 sec)
Records: 243 Deleted: 0 Skipped: 0 Warnings: 0
I tried with LOAD DATA LOCAL INFILE
instead (has recommended in other solution) and then it returns ERROR 29 (HY000): File '/home/frederic/cowtest.csv' not found (Errcode: 13)
So it is likely that things goes unspecified about SQLi extension, and the --local-infile
specification.
Many thanks
frederic