Web lists-archives.com

Re: command is not allowed with this MySQL version




Hi,

Christophe has already told,
> > The used MySQL version is 5.5.40 from Debian Wheezy package.


Maybe you missed *mysql command-line client's --local-infile option*


$ bin/mysql
mysql> SELECT @@version;
+------------+
| @@version  |
+------------+
| 5.5.40-log |
+------------+
1 row in set (0.00 sec)

mysql> SELECT @@local_infile;
+----------------+
| @@local_infile |
+----------------+
|              1 |
+----------------+
1 row in set (0.00 sec)

mysql> LOAD DATA LOCAL INFILE '/files/tmp_import.csv' INTO TABLE users
FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n' IGNORE 1 LINES
(@dummy, nom, prenom, @dummy, @dummy, email, @dummy, @dummy, @dummy,
@dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy,
@dummy, @dummy, @dummy, @dummy,@dummy, @dummy, @dummy, @dummy, @dummy,
@dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy,
@dummy, @dummy);
ERROR 1148 (42000): The used command is not allowed with this MySQL version


$ bin/mysql --local-infile
mysql> LOAD DATA LOCAL INFILE '/files/tmp_import.csv' INTO TABLE users
FIELDS TERMINATED BY ';' LINES TERMINATED BY '\n' IGNORE 1 LINES
(@dummy, nom, prenom, @dummy, @dummy, email, @dummy, @dummy, @dummy,
@dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy,
@dummy, @dummy, @dummy, @dummy,@dummy, @dummy, @dummy, @dummy, @dummy,
@dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy, @dummy,
@dummy, @dummy);
ERROR 1146 (42S02): Table 'd1.users' doesn't exist


Would you try it?

yoku0825,


2014-12-12 11:00 GMT+09:00 Johan De Meersman <vegivamp@xxxxxxxxx>:
>
> ----- Original Message -----
> > From: "Christophe" <tech@xxxxxxxxxxx>
> > Subject: command is not allowed with this MySQL version
> >
> > 'The used command is not allowed with this MySQL version'
>
> Out of sheer morbid curiosity, what version were they running?
>
> --
> Unhappiness is discouraged and will be corrected with kitten pictures.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql
>
>