diff --git a/HowtoMySQL/Troubleshooting.md b/HowtoMySQL/Troubleshooting.md index 109f645a..0864a081 100644 --- a/HowtoMySQL/Troubleshooting.md +++ b/HowtoMySQL/Troubleshooting.md @@ -704,4 +704,36 @@ Et si on veux appliquer ça aux utilisateurs : ~~~ mysql> UPDATE mysql.user SET Host='%' WHERE Host='localhost' AND User='taxes'; -~~~ \ No newline at end of file +~~~ + +## 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 +~~~