Database did not copy

Created:

2016-11-16 12:59:58 UTC

Modified:

2017-04-24 12:00:50 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Database did not copy

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  • User Database cannot be copied when making it copy to the existed database.
  • Database contains objects like view, stored procedure or trigger with explicitly determined "definer"
  • /var/log/plesk/panel.log contains the following error message:
    ERR [panel] PleskPermissionDeniedException: Permission denied.
    file: /usr/local/psa/admin/plib/CommonPanel/Controller/Action/Task/Trait.php
    line: 92
    code: 0
    trace: #0 /usr/local/psa/admin/plib/CommonPanel/Controller/Action/Task/Trait.php(33): Smb_TaskController->_checkAccess(object of type Db_Table_Row_LongTask)
    #1 /usr/local/psa/admin/externals/Zend/Controller/Action.php(516): Smb_TaskController->statusAction()
    #2 /usr/local/psa/admin/externals/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch(string 'statusAction')
    #3 /usr/local/psa/admin/externals/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(object of type Zend_Controller_Request_Http, object of type Zend_Controller_Response_Http)
    #4 /usr/local/psa/admin/plib/Application/Web.php(42): Zend_Controller_Front->dispatch(NULL null)
    #5 /usr/local/psa/admin/htdocs/application.php(15): Plesk\\Application_Web->run()

Cause

This is software issue #PPPM-4672

Workaround

  1. Dump the database into text:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin DB_NAME > DB_NAME.sql
  2. Modify definer accordingly to the new/target database username in database dump DB_NAME.sql using text editor. As well as references to the source database, if any.

  3. Restore modified dump from the command line either as new/target database user name or as admin/root user, having "super" privileges.

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin DB_NAME < DB_NAME.sql

Or with help of phpMyadmin via Home -> Tools&Settings -> Database Servers

Have more questions? Submit a request
Please sign in to leave a comment.