From c8369493bb8fddea18140d1a7e3c73d3059be87d Mon Sep 17 00:00:00 2001 From: btatu Date: Tue, 22 Oct 2019 10:35:31 +0200 Subject: [PATCH] Ajout de l'erreur 1005 --- HowtoMySQL/Troubleshooting.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/HowtoMySQL/Troubleshooting.md b/HowtoMySQL/Troubleshooting.md index fd617a6a..b5e25af2 100644 --- a/HowtoMySQL/Troubleshooting.md +++ b/HowtoMySQL/Troubleshooting.md @@ -791,4 +791,19 @@ Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> SET FOREIGN_KEY_CHECKS=1; Query OK, 0 rows affected (0.00 sec) -~~~ \ No newline at end of file +~~~ + +## Erreur 1005 + +si l'on rencontre ce type d'erreur : + +ERROR 1005 (HY000) at line 13: Can't create table `ma_base`.`ma_table` (errno: 150 "Foreign key constraint is incorrectly formed") + +Pour contourner ce problème on peut faire : + +~~~ +MariaDB [(none)]> SET FOREIGN_KEY_CHECKS=0; +Query OK, 0 rows affected (0.00 sec) +~~~ + +Ne pas oublier de remettre à "1" car sinon il y a risque de réduction de performances. \ No newline at end of file