通过GoldenGate从Oracle向MySQL的单向复制
我使用VBOX虚拟机,一台已经安装ORACLE数据库与GOLDENDGATE的主机。另一台只安装了ORACLE数据库。配置数据库环境、goldengate用户
环境:我使用VBOX虚拟机,一台已经安装Oracle数据库与GOLDENDGATE的主机。另一台只安装了ORACLE数据库。
配置数据库环境、goldengate用户,安装GoldenGate等操作参考:两台Oracle之间配置OGG-未配置同步DDL
[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错误

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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

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

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

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

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

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

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]

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