Ajout ERROR 1148: The used command is not allowed with this MySQL version
This commit is contained in:
parent
9715427b74
commit
7999eb55fb
|
@ -704,4 +704,36 @@ Et si on veux appliquer ça aux utilisateurs :
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
mysql> UPDATE mysql.user SET Host='%' WHERE Host='localhost' AND User='taxes';
|
mysql> UPDATE mysql.user SET Host='%' WHERE Host='localhost' AND User='taxes';
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
## ERROR 1148: The used command is not allowed with this MySQL version
|
||||||
|
|
||||||
|
Si cette erreur survient lors d'une requête avec un LOAD DATA LOCAL INFILE il faut vérifié sur la variable *local_infile* est bien activé :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
|
||||||
|
+---------------+-------+
|
||||||
|
| Variable_name | Value |
|
||||||
|
+---------------+-------+
|
||||||
|
| local_infile | ON |
|
||||||
|
+---------------+-------+
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Dans la configuration de mysql mettre :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
local-infile=1
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Et pour l'activer à chaud :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
SET GLOBAL local_infile=ON;
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Si une requête LOAD DATA LOCAL INFILE est faite par un script ou un applicatif qui lit la variable global [client], comme le .my.cnf d'un utilisateur, il faut ajouter la variable *loose-local-infile* dans le .my.cnf :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
[client]
|
||||||
|
loose-local-infile=1
|
||||||
|
~~~
|
||||||
|
|
Loading…
Reference in a new issue