title: establish redis connection in python
body: <p>I am using <a href="https://github.com/jart/redisbayes" rel="nofollow">redisbayes library</a> in python to implement naive bayes classification. But when I write -</p>
  
  <pre><code>rb = redisbayes.RedisBayes(redis=redis.Redis())
  rb.train('good', 'sunshine drugs love sex lobster sloth')
  </code></pre>
  
  <p>It gives the following error - </p>
  
  <pre><code>ConnectionError: Error 10061 connecting localhost:6379. 
  No connection could be made because the target machine actively refused it.
  </code></pre>
  
  <p>I tried doing it this way -</p>
  
  <pre><code>pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
  rb = redisbayes.RedisBayes(redis=redis.Redis(connection_pool=pool))
  </code></pre>
  
  <p>But it gives the same error. I am not being able to find a solution to this. How can I establish a connection to redis using python, or this any other way to do naive bayes classification in python using training data from MySQL?</p>