Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Documentation/Examples/clisync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ sync:
mysql:
username: typo3
password: loremipsum
#hostname: db.example.com
#defaultsFile: /var/www/.my-custom.cnf

# List of databases for synchronization
# examples:
Expand Down
11 changes: 11 additions & 0 deletions src/app/CliTools/Console/Command/Sync/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,12 @@ protected function wrapRemoteCommand(CommandBuilderInterface $command)
protected function createRemoteMySqlCommand($database = null)
{
$command = new RemoteCommandBuilder('mysql');

// Add defaults-file
if ($this->contextConfig->exists('mysql.defaultsFile')) {
$command->addArgumentRaw($this->contextConfig->get('mysql.defaultsFile'));
}

$command
// batch mode
->addArgument('-B')
Expand Down Expand Up @@ -1091,6 +1097,11 @@ protected function createRemoteMySqlDumpCommand($database = null)
{
$command = new RemoteCommandBuilder('mysqldump');

// Add defaults-file
if ($this->contextConfig->exists('mysql.defaultsFile')) {
$command->addArgumentRaw($this->contextConfig->get('mysql.defaultsFile'));
}

// Add username
if ($this->contextConfig->exists('mysql.username')) {
$command->addArgumentTemplate('-u%s', $this->contextConfig->get('mysql.username'));
Expand Down
2 changes: 2 additions & 0 deletions src/conf/clisync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ sync:
mysql:
username: typo3
password: loremipsum
#hostname: db.example.com
#defaultsFile: /var/www/.my-custom.cnf

# List of databases for synchronization
# examples:
Expand Down