def GetPermissionSetId(dbh, set_name):
  """Find the ID for a named permission set."""
  result = dbh.ExecuteOrDie(
      'SELECT MysqlPermissionSetId FROM admin.MysqlPermissionSets WHERE'
      ' PermissionSetLabel=%(set_name)s;', {'set_name': set_name})
  return result[0]['MysqlPermissionSetId']