Selecting a redis database while opening a connection

Selecting a database is done using the select command. However, even if
execute a select command before each command, you end up on database 0.
With this change, a database is selected when a connection is
established.