fix cli db connect, add a times generator method