Plesk

Cannot restore database on Plesk server: Access denied; you need (at least one of) the SUPER privilege(s) for this operation

Symptoms

Cause

User specified in the definer does not match with the user that used during restoration. User example_dbuser does not have CREATE_VIEW previlege.

Resolution

Note: the further instructions are intended for server administrators with direct RDP/SSH access to the server.
If direct SSH/RDP access to the server is not possible, contact server administrator for further assistance.

Click on a section to expand

For Linux

  1. Connect to the server using SSH.
  2. Restore such database as Plesk admin user and further create dumps as actual DB user
    example_dbuser
    :

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin example_dbname < /path/to/example_dbname.sql

    # mysqldump -u example_dbuser -p[dbuser_password] example_dbname > example_dbname_2.sql

Click on a section to expand

For Windows

  1. Connect to the server via RDP.

  2. Open cmd as Administrator user and restore such database as Plesk admin user and further create dumps as actual DB user
    example_dbuser
    :

    C:> "%plesk_dir%Mysqlbinmysql.exe" -uadmin -p[Plesk_admin_password] -P3306 db_example < "C:FULLPATHTOFILE_NAME.sql"

    C:> "%plesk_dir%Mysqlbinmysqldump.exe" -uexample_dbuser -p[dbuser_password] -P3306 example_dbname > "C:FULLPATHTOFILE_NAME.sql"