Java connect to Redis for issues with subscription publishing

Source: Internet
Author: User

I am using the Redis is installed on the native virtual machine, the use of Java connection encountered some errors, summed up the need to change the place as follows:

1, redis configuration file by default is bound 127.0.0.1 IP, need to find this line in redis.conf, comment out

2, Redis default does not allow non-native Client connection, itself is no password, need to set a login password, connect with a password

Set password command: Config set Requirepass xxx, after the password settings need to be certified to get the data in normal use get: Auth xxx, followed by the password just set

3, Java program Connection Redis also need to call Auth method authentication: Jedis.auth ("xxx");

Thanks to the following bloggers for sharing:

http://blog.csdn.net/yingxiake/article/details/51472810

http://blog.csdn.net/basycia/article/details/52176025

http://blog.csdn.net/wohaqiyi/article/details/65448235

This article is from a "little progress every Day" blog, make sure to keep this source http://wangguangshuo.blog.51cto.com/10283213/1951563

Java connect to Redis for issues with subscription publishing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.