diff --git a/tool/tsh/db.go b/tool/tsh/db.go index e6da2c0e7e996..a5e1ff996e8b4 100644 --- a/tool/tsh/db.go +++ b/tool/tsh/db.go @@ -353,7 +353,7 @@ func getDatabaseInfo(cf *CLIConf, tc *client.TeleportClient, dbName string) (*tl return &tlsca.RouteToDatabase{ ServiceName: db.GetName(), Protocol: db.GetProtocol(), - Username: cf.Username, + Username: cf.DatabaseUser, Database: cf.DatabaseName, }, nil } @@ -414,7 +414,7 @@ func isMFADatabaseAccessRequired(cf *CLIConf, tc *client.TeleportClient, databas dbParam := proto.RouteToDatabase{ ServiceName: database.ServiceName, Protocol: database.Protocol, - Username: cf.Username, + Username: database.Username, Database: database.Database, } mfaResp, err := cluster.IsMFARequired(cf.Context, &proto.IsMFARequiredRequest{