Get config from database