Fix parsing the database and host name.

The names here are allowed to begin with a number.