Table of contents
Open Table of contents
Article body
- After installing Redis, open Command Prompt and enter redis-cli to connect to your local instance. Initially, no password is set. To set one, open redis.windows-service.conf in the Redis installation directory, search for requirepass, and follow the indicated format to enter the password you want. For example:

- Once a password is configured, you must authenticate before performing operations. Otherwise, Redis reports the error shown below.

Authenticate by entering auth PASSWORD.
- After connecting, use Redis’s SET command to write data. For example:

The key and value are straightforward. EX and PX specify seconds and milliseconds, respectively, as the English description indicates. These options set the key’s expiration time.
