Articles in this section

In Plesk, dumps of MySQL/MariaDB databases with DEFINERs/TRIGGERs are exported with incorrect syntax of queries that should create DEFINERs/TRIGGERs

kb: bug kb: fixed Plesk for Linux

Applicable to:

  • Plesk for Linux

Symptoms

  • On a Plesk server dumping the database via Domains > example.com > Databases > example_db > Export Dump is performed for a database with DEFINERs/TRIGGERs queries. Plesk exports such a database dump with incorrect syntax:

    • The result in dump:

      CONFIG_TEXT: /* 50003 CREATE*/ /*!50017 DEFINER...

    • The expected syntax:

      CONFIG_TEXT: /* !50003 CREATE*/ /*!50017 DEFINER..

  • Importing a dump of a database with correct syntax in the lines with queries that should create DEFINERs/TRIGGERs fails with the error:

    PLESK_ERROR: Unable to import the example_db dump:
    ERROR 1064 (42000) at line 351: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DEFINER=`test`@`localhost`*/ /*!50003 TRIGGER test...' at line 1
    program 'mysql' finished with non-zero exit code: 1
    Unable to flush stdout: Broken pipe

Cause

Product issue:

  • #PPPM-13311 "Importing and exporting MySQL/MariaDB databases with one or more definers and/or triggers via the Plesk interface now works correctly."
    Fixed in:

Resolution

Please consider updating your server:

Workaround

If update is not possible for some reason you may try the following

workaround
  • Export/import dumps of databases with DEFINERs/TRIGGERs via phpMyAdmin in Domains > example.com > Databses > example_db > phpMyAdmin.


  • Export/import dumps via the command-line interface (using utilities plesk db dump or mysqldump/mysql).

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.