Replicate data from PostgreSQL to MySQL
Before you begin
To successfully complete this quicktart, you must have the following:
- A PostgreSQL installation to serve as the source database (Installation instructions follow in Task 0).
- Open port 5432 in your VCN's security list to be able to access PostgreSQL on its default port.
- An OCI MySQL Database to serve as the target database.
Task 1: Create the OCI GoldenGate Resources
This quickstart example requires deployments and connections for both
the source and target.
- Create a deployment for the source PostgreSQL database.
- Create a MySQL deployment for the target OCI MySQL Database.
- Create a PostgreSQL connection.
- For Type, select PostgreSQL Server from the dropdown.
- For Database name, enter
ociggll
. - For Host, enter the public IP of the Compute instance that PostgreSQL runs on.
- For Port, enter
5432
. - For Username, enter
ggadmin
. - For Password, enter your password.
- For Security Protocol, select Plain from the dropdown.
- Create an OCI MySQL connection.
- (Optional) If your OCI MySQL Database doesn't have a public endpoint, then create a connection to GoldenGate, and then assign this connection to the source PostgreSQL deployment.
- Assign the source connection to the source PostgreSQL deployment.
- Assign the target connection to the target MySQL deployment.
Task 3: Create the Extracts
- Add the Change Data Capture Extract:
- Add the Initial Load Extract:
You return to the Administration Service Overview page, where you can
observe the Extract starting.
Task 4: Create the Distribution Path for Initial Load Extract
To create a Distribution Path for Initial Load Extract, complete the
following:
- In the Oracle Cloud console, on the Deployments page, select the target MySQL deployment.
- On the deployment details page, click Launch Console, and log in using the admin detailed created in task 1, step 2.
- Create a user for the Distribution Path.
- In the source PostgreSQL deployment console, create a credential for the user
created in the previous step.
- Create a Distribution Path.
- In the target MySQL deployment console, review the Receiver path created as a
result of the Distribution Path:
- Click Receiver Service.
- Review the Receiver Path details.
Task 6: Create the Distribution Path for Change Data Capture
To create a Distribution Path for Change Data Capture, complete the
following:
- In the source PostgreSQL deployment console, click Distribution Service.
- Click Add Path.
- On the Add Path page, complete the following fields, and then click Create
and Run:
- For Path Name, enter a name.
- For Source Extract, select the Change Data Capture Extract
(
ECDCPSQL
). - For Trail Name, select the Change Data Capture Extract trail
file (
P1
). - For Target Authentication Method, select UserID Alias.
- For Target, select wss.
- For Target Host, enter the target MySQL deployment console URL, without the https:// or any trailing slashes.
- For Port Number, enter
443
. - For Trail Name, enter
P1
. - For Domain, enter the domain name created in task 3.
- For Alias, enter the alias created in task 3.
- In the target MySQL deployment console, click Receiver Service, and then review the Receiver Path created.
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.