Cannot connect; ERROR 1045 (28000).
Wrong password, wrong host pattern, or auth plugin mismatch.
SELECT user, host FROM mysql.user WHERE user='app'; # app@localhost vs app@%ALTER USER 'app'@'%' IDENTIFIED WITH mysql_native_password BY '...';GRANT ALL ON appdb.* TO 'app'@'%'; FLUSH PRIVILEGES;One user per app; grants in migrations, not muscle memory.
Spinning up a fresh box to reproduce or escape this error?
Managed cloud hostingNinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.
Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog