> 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-1200-to-1299/e1290.md).

# Error 1290: The MariaDB server is running with the option so it cannot execute this statement

| Error Code | SQLSTATE | Error                           | Description                                                                          |
| ---------- | -------- | ------------------------------- | ------------------------------------------------------------------------------------ |
| 1290       | HY000    | ER\_OPTION\_PREVENTS\_STATEMENT | The MariaDB server is running with the %s option so it cannot execute this statement |

## Possible Causes and Solutions

A server option forbids the statement. The message names the option:

* **`--read-only`**: with [read\_only](/docs/server/server-management/variables-and-modes/server-system-variables.md#read_only) set, accounts without the `READ_ONLY ADMIN` privilege can't change tables, except temporary tables. Before MariaDB 10.11, the `SUPER` privilege also allows changes. With `NO_LOCK_NO_ADMIN` (from MariaDB 12.0), accounts with that privilege can't either. Replicas often run with `read_only`. Run the statement on the primary, or turn `read_only` off if the server shouldn't be read-only.
* **`--secure-file-priv`**: `SELECT … INTO OUTFILE`, `SELECT … INTO DUMPFILE` and [LOAD DATA INFILE](/docs/server/reference/sql-statements/data-manipulation/inserting-loading-data/load-data-into-tables-or-index/load-data-infile.md) can use files only in the directory that [secure\_file\_priv](/docs/server/server-management/variables-and-modes/server-system-variables.md#secure_file_priv) names. Use a file in that directory, which `SELECT @@secure_file_priv` shows, or change the option, which needs a restart. `LOAD DATA LOCAL INFILE` reads the file on the client and isn't affected.
* **`--skip-grant-tables`**: the server was started without loading the privilege tables, usually to reset a lost password, so account management statements such as `CREATE USER`, `GRANT` and `SET PASSWORD` don't work. Run [FLUSH PRIVILEGES](/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush.md) to load the privilege tables, then run the statement. Restart the server without the option when you're done.
* **`--event-scheduler=DISABLED`**: the [event scheduler](/docs/server/server-usage/triggers-events/event-scheduler.md) can't be turned on at runtime when it was disabled at startup. Change the option and restart the server.

For example:

```
SELECT 1 INTO OUTFILE '/tmp/x.txt';
ERROR 1290 (HY000): The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement

INSERT INTO acct (id) VALUES (999);
ERROR 1290 (HY000): The MariaDB server is running with the --read-only=ON option so it cannot execute this statement
```

Before MariaDB 12.0, the `read_only` message names the option as `--read-only`, without a value.

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

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