当前位置:网站首页>Canal installation configuration
Canal installation configuration
2022-06-24 07:15:00 【Angryshark_ one hundred and twenty-eight】
Download resources
link :https://pan.baidu.com/s/1wKqJ0VypFxKd6WnJxIoEqg
Extraction code :wrmf
To configure Mysql
newly build canal library
CREATE USER canal IDENTIFIED BY 'canal';
GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'canal'@'%';
FLUSH PRIVILEGES;
Unzip to directory
> tar -xf canal.deployer-1.1.5-SNAPSHOT.tar.gz -C /pandora/soft/canal-1.1.5
Modify the configuration file
> vi /pandora/soft/canal-1.1.5/conf/canal.properties
# Set database instance
canal.destinations = oidd
> cp -R example/ oidd
> cd /pandora/soft/canal-1.1.5/conf/oidd
> vi instance.properties
# Database address to be monitored
canal.instance.master.address=127.0.0.1:30000
# Database user name
canal.instance.dbUsername = canal
# Database password
canal.instance.dbPassword = canal
# Specify the database that needs to be synchronized
canal.instance.defaultDatabaseName = oidd
# Specify encoding method
canal.instance.connectionCharset = UTF-8
start-up Canal
> cd /pandora/soft/cannal-1.1.5/bin
> ./startup.sh
open Canal Sample project run


Modify the parameters :IP port database user name password
package com.alibaba.otter.canal.example;
import java.net.InetSocketAddress;
import com.alibaba.otter.canal.client.CanalConnector;
import com.alibaba.otter.canal.client.CanalConnectors;
import com.alibaba.otter.canal.common.utils.AddressUtils;
/**
* Test example of stand-alone mode
*
* @author jianghang 2013-4-15 Afternoon 04:19:20
* @version 1.0.4
*/
public class SimpleCanalClientTest extends AbstractCanalClientTest {
public SimpleCanalClientTest(String destination) {
super(destination);
}
public static void main(String[] args) {
// according to ip, Create links directly , nothing HA The function of
String destination = "oidd";
String ip = "106.13.73.198";
Integer port = 11111;
String userName = "canal";
String password = "canal";
CanalConnector connector = CanalConnectors.newSingleConnector(new InetSocketAddress(ip, port),
destination,
userName,
password);
final SimpleCanalClientTest clientTest = new SimpleCanalClientTest(destination);
clientTest.setConnector(connector);
clientTest.start();
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
try {
logger.info("## stop the canal client");
clientTest.stop();
} catch (Throwable e) {
logger.warn("##something goes wrong when stopping canal:", e);
} finally {
logger.info("## canal client is down.");
}
}
});
}
}
Create new table
use oidd;
CREAETE TABLE ***
You can see the latest LOG

边栏推荐
- MFC使用控制台时 项目路径中不能有空格和中文,否则会报错误 LNK1342 未能保存要编辑的二进制文件的备份副本等
- 1. go deep into tidb: see tidb for the first time
- Become TD hero, a superhero who changes the world with Technology | invitation from tdengine community
- Tencent host security captures Yapi remote code execution 0day vulnerability for wild exploitation. The attack is spreading and can be intercepted by firewall
- Accelerate large-scale data analysis based on Apache iceberg through data organization optimization
- Laravel文档阅读笔记-Laravel Str slug() Function Example
- Why use lock [readonly] object? Why not lock (this)?
- I failed to delete the database and run away
- What is the OSI seven layer model? What is the role of each layer?
- 【图像融合】基于方向离散余弦变换和主成分分析的图像融合附matlab代码
猜你喜欢

setInterval里面的函数不能有括号

电脑如何打开软键盘,教大家Win10如何打开软键盘的方法

.NET7之MiniAPI(特别篇) :Preview5优化了JWT验证(上)

LuChen technology was invited to join NVIDIA startup acceleration program

Typora收费?搭建VS Code MarkDown写作环境

在js中正则表达式验证小时分钟,将输入的字符串转换为对应的小时和分钟

Unexpected token u in JSON at position 0

【图像融合】基于伪 Wigner 分布 (PWD) 实现图像融合附matlab代码

智能视觉组A4纸识别样例

潞晨科技获邀加入NVIDIA初创加速计划
随机推荐
What is JSP technology? Advantages of JSP technology
The P2V and V2V software starwind converter is really easy to use
Web messaging and woker classification: talking about the cross thread and cross page communication of PostMessage
华为云数据库进阶学习
0 foundation a literature club low code development member management applet (4)
Implementation and usage analysis of static pod
Tencent host security captures Yapi remote code execution 0day vulnerability for wild exploitation. The attack is spreading and can be intercepted by firewall
Multi sensor fusion track fusion
1. go deep into tidb: see tidb for the first time
The data synchronization tool dataX has officially supported reading and writing tdengine
c#:互斥锁的使用
MAUI使用Masa blazor组件库
Spark参数调优实践
Huawei cloud database advanced learning
Mysql开启BINLOG
在产业互联网时代不再有真正意义上的中心,这些中心仅仅只是化有形为无形而已
MFC使用控制台时 项目路径中不能有空格和中文,否则会报错误 LNK1342 未能保存要编辑的二进制文件的备份副本等
How to make a website? What should I pay attention to when making a website?
【pointNet】基于pointNet的三维点云目标分类识别matlab仿真
Precipitation of architecture design methodology