I am working on a Laravel project that uses dingo package to manage some APIs. I changed CACHE_DRIVER=array
variable in my .env
file to CACHE_DRIVER=redis
because dingo no longer support array
for CACHE_DRIVER
. I therefore installed redis on my system and included the package in my Laravel project by adding "predis/predis": "~1.0"
in my composer.json
and updating with the command composer update
. Up until now everything works just fine. However, to create database table and seed them using php artisan migrate --seed
, I get the error:
[Predis\Connection\ConnectionException]
SELECT
failed: NOAUTH Authentication required. [tcp://127.0.0.1:6379]
Note: when I was installing redis, I added a password. I also authenticated using the two commands redis-cli
to switch to redis and then AUTH mypassword
. Yet when I try to seed, it still throws the same error. Please what am I doing wrong?
Thanks for any help.
I would start with setting redis password in REDIS_PASSWORD
environment variable (e.g. in .env
file). See https://laravel.com/docs/5.3/redis#configuration for more details about redis configuration in Laravel.