diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 95be62c..0fbc91d 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -3231,6 +3231,10 @@ main(int argc, char **argv)
 		exit(1);
 	}
 
+	/* get the actual database name if it wasn't provided */
+	if (strcmp(dbName, "") == 0)
+		dbName = pg_strdup(PQdb(con));
+
 	if (ttype != 3)
 	{
 		/*
@@ -3241,6 +3245,7 @@ main(int argc, char **argv)
 		if (PQresultStatus(res) != PGRES_TUPLES_OK)
 		{
 			fprintf(stderr, "%s", PQerrorMessage(con));
+			fprintf(stderr, "HINT pgbench:  is \"%s\" the right database? did you initialize first (-i)?\n", dbName);
 			exit(1);
 		}
 		scale = atoi(PQgetvalue(res, 0, 0));
