split host,port,db and implement locks