connect client, server and database