/
[deployment] Broken database dump on MySQL 5.7+ [5.2.2-B2]

[deployment] Broken database dump on MySQL 5.7+ [5.2.2-B2]

In-Portal has set of build scripts written for Phing, that allows to automate testing in build servers, like Jenkins and Bamboo. One of the common tasks, that is performed during initial project setup on the build server is preparation of the test database. The "phing -f tools/build/build_custom.xml db-dump" command will create set of "*.sql" files in the "/system" folder, that will be used for that purpose.

Technical implementation of "db-dump" Phing command result in "Warning: Using a password on the command line interface can be insecure." text being added in each dump file, which breaks the import process.

Solution

In the "tools/build/targets/db.xml" file replace

<exec executable="mysqldump" checkreturn="true">

with

<exec executable="mysqldump" checkreturn="true" error="/dev/null">

which adds "error" attribute to prevent all errors being directed to output file.

Related Tasks