Linking using replication with bin log mode
In Replication Mode, Delphix creates a staging database using an initial backup from the source database. This initial backup can be taken by Delphix or can be provided by the end user. In order to ensure that the staging database remains in-sync with the source database, Delphix can set up a MySQL native replication from the sourcedatabase to the stagingdatabase.
Pre-requisites
Staging environment must be added to Delphix.
A Source Config must be created on the staging environment-MySQL repository.
This is recommended to reduce the possibility of errors while restoring the backup from the source database.
Warning
It may take upto 5 minutes after successful dSource creation for the status to show as Active.
Creating dSource
Login to Delphix Management application.
Click Manage > Datasets.
Select Add dSource.
In the Add dSource wizard, select the MySQL source configuration which is created on the staging host.
Select Replication from the dSource Type dropdown.
Provide the additional details required for dSource creation
Staging DB Server ID Server ID for the dsource (staging db. For Replication Mode, this server id must be greater than the source db server id.
Staging DB Port Port for the dsource (staging db). This port should not be used by any other application or MySQL server.
Staging Initialization Password Password to use while initializing the dsource (staging db). This password will be assigned to the 'root'@'localhost'. We need to provide Password of the root user over source. Delphix does not connect to the source db using the root user. Source root user password will be inherited for this instance once the data ingestion starts.
MySQL Base Directory MySQL installation directory. This generally has location of /bin/mysql
Mount Location on Staging Host This is the mount directory for Delphix on the staging host. This location should be unique and empty.
Source DB Host IP Address IP Address of the source db host.
Source DB UserName Delphix database user on the source database. This user will be created in the dsource when the initial backup is created or restored. If the backup generation over source is driven by Delphix, then Delphix will be using the Source DB USerName to connect to the source database. Delphix will be using this db user to manage the dSource and other time travel operations.
Source DB Password Password for the source database user.
Databases List Selective database replication is not supported. Leave blank or fill in as ALL which indicates that all databases on the source instance will be brought in.
MySQL Backup Path Full path, including the filename, of the full source db backup to use for the dsource creation. If this is provided, Delphix will not create a backup.
LogSync Whether to enable replication or not. If checked, Delphix will set up the dsource (staging db) as a replicated slave of the source database.
Replication UserName Delphix DB user with replication privileges to set up replication from source to staging db. Currently, Delphix uses the Source DB user for replication.
Replication User Password Password for the replication database user.
On dSource Configuration screen, select the dataset group where the dSource will be placed and click Next.
On the Data Management screen, select the staging environment and the environment user and click Next.
On the Policies screen, select the Snapsync and Retention policies for the dSource and click Next.
On the Hooks screen, add any pre-sync and (or) post-sync hooks as required and click Next.
Review the dSource configuration on the Summary screen and Submit. The Linking process has commenced.
![](../../__attachments/99487909/rep%202.png?inst-v=9f5cd9ef-94fe-4677-b3c4-6c5d1617af5c)
Done, what's next?
You have created a MySQL dSource. Next step - Provision a VDB.