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:
/* 50003 CREATE*/ /*!50017 DEFINER...
-
The expected syntax:
/* !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:
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:- Plesk Obsidian 18 January 2022 (Linux)
Resolution
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
ormysqldump
/mysql
).