Skip to main content
Skip table of contents

MySQL link operations via CLI

dSource creation from CLI

To create a dSource via CLI, you must create a source configuration first. For more information on creating a source configuration, refer to Add Source Config using CLI.

To create a dSource and perform operations via CLI, log in to the Delphix Continuous Data Engine using the admin user account.

CODE
ssh admin@<CONTINUOUS-DATA-FQDN-or-IP>

Set default linking parameters

This is common for all types of ingestions.

Run the following commands to set the default linking parameters. The following example uses the testscfg source config.

CODE
Example -
ip-10-110-238-142> database link
ip-10-110-238-142 database link *> set linkData.type=AppDataStagedLinkData	
ip-10-110-238-142 database link *> set name=testds
ip-10-110-238-142 database link *> set group=Untitled
ip-10-110-238-142 database link *> set linkData.config=testscfg
ip-10-110-238-142 database link *> set linkData.environmentUser=mysql-tgt.dlpxdc.co/mysql
ip-10-110-238-142 database link *> set linkData.stagingEnvironment=mysql-tgt.dlpxdc.co
ip-10-110-238-142 database link *> set linkData.stagingEnvironmentUser=mysql-tgt.dlpxdc.co/mysql

ip-10-110-238-142 database link *> set linkData.syncParameters.parameters={\"resync\":true}

Link parameters for replication with Delphix-initiated backup

CODE
Example - 

set linkData.parameters="{\"dSourceType\":\"Replication\",\"backupPath\":\"\",\"sourceip\":\"ip_address\",\"mountPath\":\"/mnt/mount_path\",\"sourceUser\":\"delphix_db\",\"sourcePass\":\"password_string\",\"stagingPass\":\"password_string\",\"stagingPort\":4009,\"serverId\":409,\"stagingBasedir\":\"/usr\",\"replicationUserFlag\":false}"

For Replication ingestion mechanism, you can also provide different replication user credentials. In this case, the parameters can be set like this : 

CODE
set linkData.parameters="{\"dSourceType\":\"Replication\",\"backupPath\":\"\",\"sourceip\":\"ip_address\",\"mountPath\":\"/mnt/mount_path\",\"sourceUser\":\"delphix_db\",\"sourcePass\":\"password_string\",\"stagingPass\":\"password_string\",\"stagingPort\":4009,\"serverId\":409,\"stagingBasedir\":\"/usr\",\"replicationUserFlag\":true, \"replicationUser\":\"replication_username\",\"replicationPass\":\"replication_password\"}"

Link parameters for replication with externally-initiated backup

CODE
Example - 

set linkData.parameters="{\"dSourceType\":\"Replication\",\"backupPath\":\"/var/backupfile\",\"sourceip\":\"ip_address\",\"mountPath\":\"/mnt/mount_path\",\"sourceUser\":\"delphix_os\",\"sourcePass\":\"password_string\",\"stagingPass\":\"password_string\",\"stagingPort\":4005,\"serverId\":405,\"stagingBasedir\":\"/usr\",\"replicationUserFlag\":false,}"
CODE
ip-10-110-238-142 database link *> set linkData.syncParameters.parameters={\"resync\":true}

Link parameters for staging push

Run the following commands to link parameters for staging push.

CODE
Example - 

set linkData.parameters="{\"dSourceType\":\"Staging Push\",\"mountPath\":\"/mnt/mount_path\",\"sourceUser\":\"delphix_db\",\"sourcePass\":\"password_string\",\"stagingPass\":\"password_string\",\"stagingPort\":4063,\"serverId\":463,\"stagingBasedir\":\"/usr\"}"

Commit the change

Run the following command to commit the change.

CODE
commit;

Enable

Run the following command to enable the dSource.

CODE
Example - 

source
select testdb
enable
commit

Disable

Run the following command to disable the dSource.

CODE
Example - 

source
select testdb
disable
commit
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.