> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1100-to-1199/e1133.md).

# Error 1133: Can't find any matching row in the user table

| Error Code | SQLSTATE | Error                   | Description                                   |
| ---------- | -------- | ----------------------- | --------------------------------------------- |
| 1133       | 28000    | ER\_PASSWORD\_NO\_MATCH | Can't find any matching row in the user table |

## Possible Causes and Solutions

An account management statement names an account that doesn't exist. This happens, for example, with [GRANT](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md) and [SET PASSWORD](/docs/server/reference/sql-statements/account-management-sql-statements/set-password.md):

```
GRANT SELECT ON shop.* TO nouser@localhost;
ERROR 1133 (28000): Can't find any matching row in the user table

SET PASSWORD FOR nouser@'%' = PASSWORD('y');
ERROR 1133 (28000): Can't find any matching row in the user table
```

An account is a user name together with a host. `'u1'@'%'` and `'u1'@'localhost'` are different accounts, so a `GRANT` to `u1@localhost` fails when only `u1@'%'` exists. A user name without a host means `'%'`.

`GRANT` doesn't create accounts, because the default [SQL\_MODE](/docs/server/server-management/variables-and-modes/sql_mode.md) contains `NO_AUTO_CREATE_USER`. `GRANT … IDENTIFIED BY` still creates the account.

To solve the error:

* List the existing accounts, with `SELECT User, Host FROM mysql.user`, and use the exact user name and host.
* Create the account first with [CREATE USER](/docs/server/reference/sql-statements/account-management-sql-statements/create-user.md), then grant the privileges.
* If you changed the `mysql.user` table directly, run [FLUSH PRIVILEGES](/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush.md) so that the server reads it again. Use account management statements instead of changing the table.

Other statements give other errors for an account that doesn't exist: `ALTER USER` gives [error 1396](/docs/server/reference/error-codes/mariadb-error-codes-1300-to-1399/e1396.md), and `REVOKE` gives [error 1141](/docs/server/reference/error-codes/mariadb-error-codes-1100-to-1199/e1141.md).

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
