Home Database Mysql Tutorial 通过GoldenGate从Oracle向MySQL的单向复制

通过GoldenGate从Oracle向MySQL的单向复制

Jun 07, 2016 pm 05:32 PM
Pass

我使用VBOX虚拟机,一台已经安装ORACLE数据库与GOLDENDGATE的主机。另一台只安装了ORACLE数据库。配置数据库环境、goldengate用户

环境:我使用VBOX虚拟机,一台已经安装Oracle数据库与GOLDENDGATE的主机。另一台只安装了ORACLE数据库。
配置数据库环境、goldengate用户,安装GoldenGate等操作参考:两台Oracle之间配置OGG-未配置同步DDL 

一.安装MYSQL 安装MYSQL数据库客户端:

[root@bys2 ~]# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@bys2 ~]# rpm -qa mysql
[root@bys2 ~]# cd /mnt/cdrom/
[root@bys2 cdrom]# yum -y install mysql
安装服务器端
[root@bys2 cdrom]# yum -y install mysql-server
[root@bys2 cdrom]# rpm -qa mysql*
mysql-5.0.77-4.el5_6.6
mysql-server-5.0.77-4.el5_6.6
##########################
启动MYSQL
[root@bys2 cdrom]# service mysqld status
mysqld is stopped
[root@bys2 cdrom]# service mysqld start
Starting MySQL: [ OK ]

创建用来做同步的用户和表

[oracle@bys2 ~]$ mysql -u root
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql> create database oggtest;
Query OK, 1 row affected (0.00 sec)
mysql> use oggtest;
Database changed
mysql> grant all privileges on *.* to 'root'@'%' identified by '123456';
Query OK, 0 rows affected (0.01 sec)
mysql> grant all privileges on *.* to 'ogg'@'%' identified by 'ogg';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> use oggtest
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> create table test5(aa int primary key) engine=innodb;
Query OK, 0 rows affected (0.02 sec)
mysql> show tables;
+-------------------+
| Tables_in_oggtest |
+-------------------+
| test5 |
+-------------------+
1 row in set (0.00 sec)
mysql> select * from test5;
Empty set (0.01 sec)
退出后使用[oracle@bys2 mysqlogg]$ mysql -u root -p 进行登陆测试,确认使用 root用户及密码可以登陆。
如不能登陆,可以参考:
###########################################
二.安装OGG-FOR-MYSQL
[oracle@bys2 ~]$ tar -xvf ggs_Linux_x86_MySQL_32bit.tar -C /u01/mysqlogg/
[oracle@bys2 mysqlogg]$ pwd
/u01/mysqlogg
[oracle@bys2 mysqlogg]$ ./ggsci
Oracle GoldenGate Command Interpreter for MySQL
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Linux, x86, 32bit (optimized), MySQL Enterprise on Apr 23 2012 04:29:30
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (bys2.oel.com) 1> create subdirs
Creating subdirectories under current directory /u01/mysqlogg
Parameter files /u01/mysqlogg/dirprm: already exists
Report files /u01/mysqlogg/dirrpt: created
Checkpoint files /u01/mysqlogg/dirchk: created
Process status files /u01/mysqlogg/dirpcs: created
SQL script files /u01/mysqlogg/dirsql: created
Database definitions files /u01/mysqlogg/dirdef: created
Extract data files /u01/mysqlogg/dirdat: created
Temporary files /u01/mysqlogg/dirtmp: created
Stdout files /u01/mysqlogg/dirout: created

更多详情见请继续阅读下一页的精彩内容

相关阅读:

RAC环境下管理OGG-HA

RAC环境下配置OGG同步

GoldenGate单向表DML同步

Oracle GoldenGate 系列:Extract 进程的恢复原理

Oracle GoldenGate安装配置

Oracle goldengate的OGG-01004 OGG-1296错误

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Reduce the use of MySQL memory in Docker Reduce the use of MySQL memory in Docker Mar 04, 2025 pm 03:52 PM

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

How to solve the problem of mysql cannot open shared library How to solve the problem of mysql cannot open shared library Mar 04, 2025 pm 04:01 PM

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

How do you alter a table in MySQL using the ALTER TABLE statement? How do you alter a table in MySQL using the ALTER TABLE statement? Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Run MySQl in Linux (with/without podman container with phpmyadmin) Run MySQl in Linux (with/without podman container with phpmyadmin) Mar 04, 2025 pm 03:54 PM

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

What is SQLite? Comprehensive overview What is SQLite? Comprehensive overview Mar 04, 2025 pm 03:55 PM

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

Running multiple MySQL versions on MacOS: A step-by-step guide Running multiple MySQL versions on MacOS: A step-by-step guide Mar 04, 2025 pm 03:49 PM

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

How do I configure SSL/TLS encryption for MySQL connections? How do I configure SSL/TLS encryption for MySQL connections? Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

See all articles