From 3d8b8ecc935ff3373364d48fbfb5391c93cf7792 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 21 Sep 2023 17:18:15 -0400 Subject: [PATCH] Support using MySQL without a password Fixes #568 --- app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.go b/app.go index c7bdbb5..bf15b9e 100644 --- a/app.go +++ b/app.go @@ -569,8 +569,8 @@ func (app *App) InitDecoder() { // tests the connection. func ConnectToDatabase(app *App) error { // Check database configuration - if app.cfg.Database.Type == driverMySQL && (app.cfg.Database.User == "" || app.cfg.Database.Password == "") { - return fmt.Errorf("Database user or password not set.") + if app.cfg.Database.Type == driverMySQL && app.cfg.Database.User == "" { + return fmt.Errorf("Database user not set.") } if app.cfg.Database.Host == "" { app.cfg.Database.Host = "localhost"