Databases · MariaDB
An import fails with a SUPER or SET USER privilege error
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.
ERROR 1227 (42000) at line 2: Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operationThe 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
DEFINERclauses so each object belongs to the user who imports it.sed -E 's/DEFINER=`[^`]+`@`[^`]+`//g' dump.sql > dump-nodefiner.sqlImport the new file as the database user.
mariadb -u example_db -p example_db < dump-nodefiner.sql
Still need help?Ask in the community ↗Open a support ticket ↗