Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davy_yg's avatar

AUTH failed: ERR AUTH <password> called without any password configured for the default user

davy@davy-VirtualBox:~/Desktop/files$ redis-cli -h 127.0.0.1 -p 6380 -a 12345 < ./import_movies.redis Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe. AUTH failed: ERR AUTH called without any password configured for the default user. Are you sure your configuration is correct? (integer) 0 (integer) 0 (integer) 0 (integer) 0

Any idea why this error appears?

0 likes
2 replies
LaryAI's avatar

The error message:

AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?

means that you are trying to authenticate to your Redis server using a password (-a 12345), but your Redis server is not configured to require a password.

Why does this happen?

  • By default, Redis does not require a password unless you set one in your redis.conf file (using the requirepass directive).
  • If you try to authenticate with a password when Redis is not expecting one, you get this error.

How to fix:

Option 1: Remove the -a flag

If your Redis server does not require a password, simply remove the -a 12345 part from your command:

redis-cli -h 127.0.0.1 -p 6380 < ./import_movies.redis

Option 2: Set a password in your Redis config

If you want your Redis server to require a password, edit your redis.conf (or wherever your config is) and set:

requirepass 12345

Then restart your Redis server. After that, your original command will work.

Summary:

  • If you don't want to use a password, remove -a 12345.
  • If you want to use a password, set requirepass 12345 in your Redis config and restart the server.

Let me know if you need help finding or editing your redis.conf file!

nicholaswinston's avatar

The Problem in Simple Terms:

Imagine your Laravel website needs to talk to a super-fast data storage place called Redis. To get in, Redis might have a "secret knock" (a password). This error message means your website tried to knock (sent the part), but either:

Redis wasn't expecting a secret knock at all (no password set up). Your website used the wrong secret knock (wrong password). How to Fix It - Step by Step:

Think of it like checking different ways to open a door:

  1. Check Your Website's "Secret Knock" Settings:

Open the file named .env in your Laravel project. It's like a settings book for your website.

Look for lines that start with REDIS_. The important one is REDIS_PASSWORD.

Does Redis have a password? If you set up a password for Redis, make sure the REDIS_PASSWORD= line in this file has the exact same password after the equals sign. Does Redis NOT have a password? If you didn't set up a password for Redis, make sure the REDIS_PASSWORD= line in this file is just empty, like this: REDIS_PASSWORD=. Important: After changing anything in this file, tell Laravel to refresh its settings by running this command in your terminal (the black screen where you type commands):

Bash

php artisan config:clear 2. Double-Check Another Settings File:

Go to the folder config in your Laravel project and open the file named database.php. Look for a section that says 'redis'. Inside that, find another section called 'default'. Make sure the line 'password' => env('REDIS_PASSWORD', null), looks right. It should basically be using whatever you put in your .env file. 3. Look at Redis's Own "Lock" Settings:

This step is about checking how Redis itself is set up. You'll need to find a file called redis.conf. Where this file is depends on how you installed Redis (it might be in folders like /etc/redis/ or /usr/local/etc/).

Open this redis.conf file and look for a line that says # requirepass foobared (the foobared part might be different).

If you see requirepass with a word after it (and the line doesn't start with #): That word is the password Redis is expecting. Make sure your REDIS_PASSWORD in Laravel's .env file matches this exactly. If you see requirepass with a # in front of it: That means Redis isn't using a password. In this case, your REDIS_PASSWORD in Laravel's .env should be empty. Big Reminder: If you change anything in the redis.conf file, you need to restart your Redis server for the changes to work.

  1. Newer Redis Might Have "User" Rules:

If you're using a very recent version of Redis, it has more advanced ways to control access using "users." You might need to use a special command-line tool for Redis called redis-cli to see these user settings. If you're not sure about this, it's less likely to be the main problem, but it's something to keep in mind if the other steps don't work. Basically, the error means Laravel and Redis aren't agreeing on whether a password is needed and, if so, what that password is. Go through these steps to make sure they're on the same page!

Please or to participate in this conversation.