summaryrefslogtreecommitdiff
path: root/mysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysql.c')
-rw-r--r--mysql.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql.c b/mysql.c
index 4479596bc..1b83502c2 100644
--- a/mysql.c
+++ b/mysql.c
@@ -59,6 +59,15 @@ int db_mysql_init()
alog("MySQL has been enabled.");
}
+ /* The following configuration options are required.
+ * If missing disable MySQL to avoid any problems.
+ */
+
+ if (!MysqlName || !MysqlUser) {
+ do_mysql = 0;
+ alog("MySQL Error: Set all required configuration options.");
+ }
+
if (!db_mysql_open())
do_mysql = 0;