# An import fails with a SUPER or SET USER privilege error

UrbeStack sysadmin note about MariaDB. Last updated 30 Nov 2026.

A MariaDB import stops with an access denied error that asks for the `SUPER` or `SET USER` privilege. The dump's views, triggers, or routines name a `DEFINER` from the old server, and removing those clauses fixes the import.

## Symptoms

The import stops with this error.

```output
ERROR 1227 (42000) at line 2: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
```

The line named in the error creates a view, trigger, procedure, function, or event and includes `DEFINER=`.

## Cause

The dump records the account that created each view, trigger, and routine on the old server, such as `` DEFINER=`olduser`@`localhost` ``.

Creating an object for another account requires the `SUPER` or `SET USER` privilege. A customer's database user lacks both privileges.

## Resolution

Remove the `DEFINER` clauses so each object belongs to the user who imports it.

```
sed -E 's/DEFINER=`[^`]+`@`[^`]+`//g' dump.sql > dump-nodefiner.sql
```

Import the new file as the database user.

```
mariadb -u example_db -p example_db < dump-nodefiner.sql
```

If the problem persists after you follow this note, you can [open a support ticket](https://support.urbestack.com/new?type=support). Including the output of the commands you ran helps support diagnose the problem.
