# Incrementing of the access\_denied\_errors Status Variable

The [access\_denied\_errors](/docs/server/server-management/variables-and-modes/server-status-variables.md#access_denied_errors) status variable is incremented when someone tries to access something they do not have rights to.

This happens in the following cases:

* When accessing a database, table, or column that the user does not have rights to access. The error is sent to the client.
* When a login fails because of the wrong user/password, etc. The error is printed to the general log.
* When the require\_secure\_transport option is enabled on the server, and the user has not used a secure transport. The error is sent to the client.
* Users try to change to a database/schema they do not have access to. A warning is written to the error log if log\_warnings > 1.
* Users try to use a `SHOW` command to access an object they do not have rights to see. The error is sent to the client.
* Users access something that requires global access, like "CREATE SERVER". The error is sent to the client.

Login failures can be found in the [general log](/docs/server/server-management/server-monitoring-logs/general-query-log.md). Errors that are sent to the client can be found by using the [SQL Error Log Plugin](/docs/server/server-management/server-monitoring-logs/sql-error-log-plugin.md). The plugin captures all errors sent to the client. Starting from [MariaDB 10.11.5](/docs/release-notes/community-server/10.11/10.11.5.md), it can also optionally capture all warnings sent to the client.

### See Also

* [Troubleshooting Connection Issues](/docs/server/mariadb-quickstart-guides/mariadb-connection-troubleshooting-guide.md)
* [GRANT](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md)
* [Error 1045: Access denied for user (using password)](/docs/server/reference/error-codes/mariadb-error-codes-1000-to-1099/e1045.md)

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

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/security/user-account-management/incrementing-of-the-access_denied_errors-status-variable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
