golang gorm Access the underlying mysql query May 7, 2023 by Tarik This will do the trick: db, err:= Open(dbType, connectionDSN); db.LogMode(true)