Grep by word for DB Name

Say you create database `foo` and later want to create `foobar`
without `grep -w` the grep will match `foo` and not create `foobar`. With word matching it will.