Quellcode durchsuchen

Support using MySQL without a password

Fixes #568
passwordless-db
Matt Baer vor 7 Monaten
Ursprung
Commit
3d8b8ecc93
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. +2
    -2
      app.go

+ 2
- 2
app.go Datei anzeigen

@@ -569,8 +569,8 @@ func (app *App) InitDecoder() {
// tests the connection. // tests the connection.
func ConnectToDatabase(app *App) error { func ConnectToDatabase(app *App) error {
// Check database configuration // 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 == "" { if app.cfg.Database.Host == "" {
app.cfg.Database.Host = "localhost" app.cfg.Database.Host = "localhost"


Laden…
Abbrechen
Speichern