Databases 27
PostgreSQL, MySQL and Redis errors on real servers: the error, the cause and the setting to change — reproduced in the official images.
- PostgreSQL 19 upgrade: pg_upgrade --check and breaking changes
Run pg_upgrade --check before upgrading to PostgreSQL 19, then check your 18 server for the release-note changes that hit settings, indexes and names.
PostgreSQL 18.7 → 19.0 (Debian 13 container · PGDG apt) · release notes of 2026-11-19 · 2026-11 - PostgreSQL 18.7 / 17.12 security update — check your version
PostgreSQL 18.7, 17.12, 16.16, 15.20, 14.25 fix 52 security flaws (2026-11-12). How to check your version, update without a dump, and the follow-up steps.
PostgreSQL 18.6 (Docker postgres:18.6) · official announcement of 2026-11-12 · 2026-11 - PostgreSQL autovacuum tuning: n_dead_tup, thresholds, per-table
PostgreSQL autovacuum waits for dead tuples above 50 + 20% of the table. Compare n_dead_tup to that, lower it per table, and find long transactions.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Fix PostgreSQL FATAL: sorry, too many clients already
PostgreSQL sorry, too many clients already: all max_connections slots are taken. Use a reserved slot, end idle sessions from pg_stat_activity, add timeouts.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Fix PostgreSQL "Connection refused" on 5432 (listen_addresses)
psql Connection refused: nothing listens on that address and port. Check the server, port and listen_addresses, restart, then open pg_hba.conf.
PostgreSQL 17.11 (Docker postgres:17) · iproute2 6.15 · 2026-10 - Fix MySQL ERROR 1205 Lock wait timeout exceeded: find the blocker
MySQL ERROR 1205 Lock wait timeout exceeded means another transaction held the row lock past the wait limit. Find it in sys.innodb_lock_waits and fix it.
MySQL 8.4.13 (Docker mysql:8.4) · 2026-10 - Fix MySQL ERROR 1045 Access denied for user (using password: YES)
MySQL ERROR 1045 (using password: YES) is not always a wrong password. Match 'user'@'host' to mysql.user and rule out the shell or an option file.
MySQL 8.4.13 (Docker mysql:8.4) · 2026-10 - Fix PostgreSQL FATAL: role does not exist (psql, Docker)
PostgreSQL FATAL: role "root" does not exist means psql used your OS user name as the role. Pass -U with a real role; in Docker, check POSTGRES_USER.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Redis 7 latency tuning: appendfsync, THP, LATENCY DOCTOR, SLOWLOG
Find Redis latency spikes with SLOWLOG and the latency monitor: slow command, fork or AOF write. Then check appendfsync and THP, and roll back.
Redis 7.4.12 (Docker redis:7) · 2026-10 - MySQL 8.4 innodb_buffer_pool_size and innodb_redo_log_capacity
Resize MySQL 8.4 innodb_buffer_pool_size (128MB) and redo capacity online. Check disk reads, change with SET PERSIST, roll back with RESET PERSIST.
MySQL 8.4.13 (Docker mysql:8.4) · 2026-10 - Which pg_hba.conf line matched? Find it with log_connections
With log_connections on, PostgreSQL 17 logs the pg_hba.conf line number even for successful logins. Failures show line N in DETAIL; reject lines show no number.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Fix Redis NOAUTH Authentication required and WRONGPASS
Redis NOAUTH Authentication required means a password-protected server got a command before AUTH. Tell requirepass from ACL users and send the right AUTH.
Redis 7.4.12 (Docker redis:7) · 2026-10 - Redis WRONGTYPE Operation against a key holding the wrong kind
Redis WRONGTYPE Operation against a key means the command does not match the key's data type. Check the real type with TYPE, then fix the command or key name.
Redis 7.4.12 (Docker redis:7) · 2026-10 - Fix Redis DENIED Redis is running in protected mode
Redis DENIED running in protected mode means the default user has no password, so remote clients get blocked. Set a password; don't turn protected mode off.
Redis 7.4.12 (Docker redis:7) · 2026-10 - Could not connect to Redis at 127.0.0.1:6379: Connection refused
Redis Connection refused on 127.0.0.1:6379 means nothing listens on that address and port. Check the server, the port, bind, and localhost in containers.
Redis 7.4.12 (Docker redis:7) · 2026-10 - Fix PostgreSQL password authentication failed for user
PostgreSQL password authentication failed for user hides five causes. The server log DETAIL line tells a wrong password, missing role, md5 hash or expiry apart.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Fix no pg_hba.conf entry for host "::1" (localhost is IPv6)
no pg_hba.conf entry for host "::1": localhost went over IPv6 but pg_hba.conf only allows 127.0.0.1/32. Add a ::1/128 line or use -h 127.0.0.1.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Fix PostgreSQL FATAL: database does not exist (psql, Docker)
PostgreSQL FATAL: database "appuser" does not exist means psql used the role name as the database. Pass -d with a real database or run createdb.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Fix PostgreSQL "Peer authentication failed for user" in psql
Peer authentication failed for user: on a socket connection your OS user name differs from the role. Connect as the matching user or use -h 127.0.0.1.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Fix Redis OOM command not allowed when used memory > 'maxmemory'
Redis OOM command not allowed means maxmemory is reached and no key can be evicted. Check maxmemory-policy and TTLs, then change the policy or the limit.
Redis 7.4.12 (Docker redis:7) · 2026-10 - ERROR 2002: Can't connect to local MySQL server through socket
MySQL ERROR 2002 means the server is down or the client looks for the socket in the wrong place. Read the errno, find @@socket, and fix the client path.
MySQL 8.4.13 (Docker mysql:8.4) · 2026-10 - Fix MySQL ERROR 1698: Access denied for user 'root'@'localhost'
Ubuntu mysql -u root fails with ERROR 1698 because root@localhost uses auth_socket, not a password. Log in with sudo mysql and create a separate admin user.
Ubuntu 24.04 (Docker) · MySQL 8.0.46-0ubuntu0.24.04.4 · 2026-10 - Fix MySQL 8.4 Plugin 'mysql_native_password' is not loaded
MySQL 8.4 ERROR 1524 means mysql_native_password is disabled by default. Move accounts to caching_sha2_password, or re-enable the plugin for now.
MySQL 8.4.13 (Docker mysql:8.4) · 2026-10 - PostgreSQL 17 memory tuning: shared_buffers and work_mem
Tune PostgreSQL 17 shared_buffers (restart, 25% of RAM to start) and work_mem (per sort/hash node). Measure disk spills with EXPLAIN and temp file logs first.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10 - Fix Redis MISCONF: unable to persist to disk (RDB snapshots)
Redis MISCONF unable to persist to disk means the last RDB save failed and writes are blocked. Find the cause in the log, fix it, then run BGSAVE.
Redis 7.4.12 (Docker redis:7) · 2026-10 - Fix MySQL ERROR 1040: Too many connections
MySQL ERROR 1040 Too many connections means max_connections is used up. Use the reserved admin slot, kill leaked idle connections, then size the limit.
MySQL 8.4.13 (Docker mysql:8.4) · 2026-10 - pg_hba.conf was not reloaded: one bad line keeps the old rules
pg_hba.conf was not reloaded means one bad line made PostgreSQL discard the whole new file. Find it with pg_hba_file_rules, fix it, and reload again.
PostgreSQL 17.11 (Docker postgres:17) · 2026-10