diff --git a/openair2/UTIL/OTG/otg_rx.c b/openair2/UTIL/OTG/otg_rx.c
index 74f72db1b0159f2475acedf27a20c7b74cb0bf80..a428c605526aba576c24a438fd66d8d2a2690344 100644
--- a/openair2/UTIL/OTG/otg_rx.c
+++ b/openair2/UTIL/OTG/otg_rx.c
@@ -42,11 +42,13 @@
 #include "otg_vars.h"
 #include "../UTIL/MATH/oml.h"
 #include <math.h>
+#include "otg_form.h"
+
+#ifdef ENABLE_DB_STATS
 #include <mysql.h>
 #include <m_ctype.h>
 #include <sql_common.h>
-#include "otg_form.h"
-
+#endif 
 
 extern unsigned char NB_eNB_INST;
 extern unsigned char NB_UE_INST;