Add to Favourites Add to Favourites    Print this Article Print this Article

MySQL Restore error: Access denied; you need (at least one of) the SUPER privilege(s) for this operation

If you run into the "SUPER privilege" when running a MySQL restore, it would be because the restores do not run with a root/super level privilege, for security reasons.

UPDATE: as of DirectAdmin 1.49.2, you can set an Admin Level restore to run with da_admin to overcome this issue.
The option must be enabled in the directadmin.conf to do this:
https://www.directadmin.com/features.php?id=1817



old way

If you need to restore a trusted database (sql file) that has items which requires the SUPER level access, then you'd need to do it manually.

1) Extract the sql file from the backup. Adjust the backup path as needed:

cd /home/admin/admin_backups
mkdir temp
cd temp
tar xvzf ../user.admin.username.tar.gz backup
cd backup

which should have the sql file in the directory.

2) Grab the da_admin user/pass to do the restore with.  This is a root level account, so ensure you trust the contents of the SQL file:

cat /usr/local/directadmin/conf/mysql.conf



3) Then restore the username_dbname.sql file:

mysql -uda_admin -ppassword username_dbname < username_dbname.sql

which should get past the above errors.

Was this answer helpful?

Also Read