1130 🐬 MySQL

MySQL ERROR 1130 (HY000): Host 'x' is not allowed to connect to this MySQL server

No MySQL account exists for the host you’re connecting from.

Seen on: MySQL

Meaning

Accounts are user@host. A user created as 'app'@'localhost' can’t log in from another machine or container. Remote access needs a matching host ('app'@'%' or a specific IP).

Common causes

  • User only defined for localhost
  • Connecting from a container/another server
  • bind-address limits plus missing remote user

⚡ Quick fix

  1. Create the user for the client host or a subnet
  2. Grant privileges
  3. Check bind-address in my.cnf for remote access

Detailed fix by platform

MySQL

  1. sql
    CREATE USER 'app'@'10.0.0.%' IDENTIFIED BY 'StrongPass!';
    GRANT ALL ON appdb.* TO 'app'@'10.0.0.%';

How to diagnose

  1. Host — Which host is reported?
  2. Accounts — SELECT user, host FROM mysql.user

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.