Reset and restart linux redis, and set the password for linuxredis

Source: Internet
Author: User

Reset and restart linux redis, and set the password for linuxredis
1. Put

# Requirepass foobared remove comments and change foobared to its own password. Here I will change it

Requrequirepass 123456

2. Start the redis Service

./Redis-server redis. conf &

Here we mainly use redis. conf path, and pay special attention to the following &, because it does not bring & is the interface version to start, if the interface is closed, redis will be closed; plus & is the background startup, A redis thread is added.

Check whether redis is started:

A. ps-ef | grep redis check whether there are redis threads,

As shown in: root 6188 1 0? 00:00:01./redis-server 127.0.0.1: 6379 is correct

B.

./Redis-cli

Keys *

If you can directly access, the front password is not set successfully. If not

Auth123456

Then keys * can be used normally.

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.