benfa
Forum Replies Created
-
Forum: Plugins
In reply to: [Redis Object Cache] Can connect only as default userI want to connect from WordPress to Redis as a specific user. This user will have a specific ACL applied to it.
I can connect only if I specify the default user. In redis.conf, it is this:
requirepass ‘<password>’
…and in wp-config.php, I declare REDIS_PASSWORD, but not REDIS_USER.
Connection fails if I try to connect as user benfa, specified in redis.conf like this:
user benfa allcommands allkeys on >'<password>’
…and in wp-config.php, I declare both REDIS_USER and REDIS_PASSWORD.
Forum: Plugins
In reply to: [Redis Object Cache] Can connect only as default userHere’s the full text of what’s in the diagnostics tab:
——————————————————Status: Connected Client: PhpRedis (v5.3.3) Drop-in: Valid Disabled: No Ping: 1 Errors: [] PhpRedis: 5.3.3 Predis: Not loaded Credis: Not loaded PHP Version: 7.4.16 Plugin Version: 2.0.17 Redis Version: 6.2.1 Multisite: No Filesystem: Working Global Prefix: "wp_" Blog Prefix: "wp_" WP_REDIS_HOST: "redis.benfa-redis.svc.cluster.local" WP_REDIS_PORT: 6379 WP_REDIS_DATABASE: 0 WP_REDIS_TIMEOUT: 1 WP_REDIS_READ_TIMEOUT: 1 WP_REDIS_PASSWORD: •••••••• Global Groups: [ "blog-details", "blog-id-cache", "blog-lookup", "global-posts", "networks", "rss", "sites", "site-details", "site-lookup", "site-options", "site-transient", "users", "useremail", "userlogins", "usermeta", "user_meta", "userslugs", "redis-cache", "blog_meta" ] Ignored Groups: [ "counts", "plugins", "themes" ] Unflushable Groups: [] Drop-ins: [ "advanced-cache.php v by ", "Redis Object Cache Drop-In v2.0.17 by Till Krüss" ]——————————————————
I noticed that the diagnostics tab was displaying the Redis variables in a different order than wp-config.php, so I changed wp-config.php to match that order. REDIS_PASSWORD is the last of the Redis variables, with REDIS_USER preceding it, if it is used.