Kite学习历程的第三十二天

目录

  • Kite学习历程的第三十二天
    • 1. Seata的安装
      • 1.1 Seata 的下载
      • 1.2 修改配置文件
      • 1.3 在MySQL中创建数据库seata
    • 2. 如果你的MySQL是8.0以上的进行seata的运行就会报连接数据库错误
      • 3. 运行

1. Seata的安装

1.1 Seata 的下载

注意如果你在官网进行下载的话会速度特别的慢,而已下到一般还出现错误,亲生经历,所以此处给大家一个网盘下载地址:
1.1版本:
链接: https://pan.baidu.com/s/1Z4YY0-VXlmrePrH-6CfS7Q 提取码: pnis
0.9版本:(我安装的版本,因为更新到1.0后config中不提供数据库语句)
链接: https://pan.baidu.com/s/1iiCjytQDuDy0r-NkNdkzvw 提取码: bahw

1.2 修改配置文件

打开config文件夹

  1. 修改file.conf文件
    修改内容我在下面进行了注解

transport {# tcp udt unix-domain-sockettype = "TCP"#NIO NATIVEserver = "NIO"#enable heartbeatheartbeat = true#thread factory for nettythread-factory {boss-thread-prefix = "NettyBoss"worker-thread-prefix = "NettyServerNIOWorker"server-executor-thread-prefix = "NettyServerBizHandler"share-boss-worker = falseclient-selector-thread-prefix = "NettyClientSelector"client-selector-thread-size = 1client-worker-thread-prefix = "NettyClientWorkerThread"# netty boss thread size,will not be used for UDTboss-thread-size = 1#auto default pin or 8worker-thread-size = 8}shutdown {# when destroy server, wait secondswait = 3}serialization = "seata"compressor = "none"
}
service {#vgroup->rgroup#此处修改default为kitey(这里可以修改任何名称)vgroup_mapping.my_test_tx_group = "kitey"#only support single nodedefault.grouplist = "127.0.0.1:8091"#degrade current not supportenableDegrade = false#disabledisable = false#unit ms,s,m,h,d represents milliseconds, seconds, minutes, hours, days, default permanentmax.commit.retry.timeout = "-1"max.rollback.retry.timeout = "-1"
}client {async.commit.buffer.limit = 10000lock {retry.internal = 10retry.times = 30}report.retry.count = 5tm.commit.retry.count = 1tm.rollback.retry.count = 1
}## transaction log store
store {## store mode: file、db#此处修改mode为dbmode = "db"## file storefile {dir = "sessionStore"# branch session size , if exceeded first try compress lockkey, still exceeded throws exceptionsmax-branch-session-size = 16384# globe session size , if exceeded throws exceptionsmax-global-session-size = 512# file buffer size , if exceeded allocate new bufferfile-write-buffer-cache-size = 16384# when recover batch read sizesession.reload.read_size = 100# async, syncflush-disk-mode = async}## database storedb {## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp) etc.datasource = "dbcp"## mysql/oracle/h2/oceanbase etc.db-type = "mysql"driver-class-name = "com.mysql.jdbc.Driver"#此处修改你的数据库连接url = "jdbc:mysql://127.0.0.1:3306/seata?useUnicode=true&characterEncoding=UTF8&serverTimezone=UTC"user = "root"password = "25002500"min-conn = 1max-conn = 3global.table = "global_table"branch.table = "branch_table"lock-table = "lock_table"query-limit = 100}
}
lock {## the lock store mode: local、remotemode = "remote"local {## store locks in user's database}remote {## store locks in the seata's server}
}
recovery {#schedule committing retry period in millisecondscommitting-retry-period = 1000#schedule asyn committing retry period in millisecondsasyn-committing-retry-period = 1000#schedule rollbacking retry period in millisecondsrollbacking-retry-period = 1000#schedule timeout retry period in millisecondstimeout-retry-period = 1000
}transaction {undo.data.validation = trueundo.log.serialization = "jackson"undo.log.save.days = 7#schedule delete expired undo_log in millisecondsundo.log.delete.period = 86400000undo.log.table = "undo_log"
}## metrics settings
metrics {enabled = falseregistry-type = "compact"# multi exporters use comma dividedexporter-list = "prometheus"exporter-prometheus-port = 9898
}support {## springspring {# auto proxy the DataSource beandatasource.autoproxy = false}
}
  1. 修改 registry.conf
    type = “nacos” 为nacos
    nacos中的serverAddr=“localhost:8848”
registry {# file 、nacos 、eureka、redis、zk、consul、etcd3、sofatype = "nacos"nacos {serverAddr = "localhost:8848"namespace = ""cluster = "default"}eureka {serviceUrl = "http://localhost:8761/eureka"application = "default"weight = "1"}redis {serverAddr = "localhost:6379"db = "0"}zk {cluster = "default"serverAddr = "127.0.0.1:2181"session.timeout = 6000connect.timeout = 2000}consul {cluster = "default"serverAddr = "127.0.0.1:8500"}etcd3 {cluster = "default"serverAddr = "http://localhost:2379"}sofa {serverAddr = "127.0.0.1:9603"application = "default"region = "DEFAULT_ZONE"datacenter = "DefaultDataCenter"cluster = "default"group = "SEATA_GROUP"addressWaitTime = "3000"}file {name = "file.conf"}
}config {# file、nacos 、apollo、zk、consul、etcd3type = "file"nacos {serverAddr = "localhost"namespace = ""}consul {serverAddr = "127.0.0.1:8500"}apollo {app.id = "seata-server"apollo.meta = "http://192.168.1.204:8801"}zk {serverAddr = "127.0.0.1:2181"session.timeout = 6000connect.timeout = 2000}etcd3 {serverAddr = "http://localhost:2379"}file {name = "file.conf"}
}

1.3 在MySQL中创建数据库seata

以及相关的表

sql执行的语句在config中的

2. 如果你的MySQL是8.0以上的进行seata的运行就会报连接数据库错误

原因:因为seata的lib文件中的mysql驱动为5.几的版本不能连接8.0
解决方案: 删除lib中原来的mysql连接,然后添加醒的mysql数据连接,我这里添加的是:

3. 运行

  1. 首相运行nacos
  2. 运行seata,点击bin中的

    运行结果:

Kite的学习历程SpringCloud之Seata安装相关推荐

  1. python学习历程-安装篇(一)

    python学习历程-安装篇 之前工作中数据量很少,每天也就是用excel发一下报表,函数已经足够应付工作内容,但心里一直渴望学习更深层次一点的数据分析(崇拜那些技术大神),网上看了很多有关数据分析挖 ...

  2. 小程序学习历程(二):注册小程序测试号

     该文适合还没有微信小程序开发者账号,以及有了开发者账号同时还想注册一个测试账号的读者. 开发者测试账号推出的用意,主要是:方便我们在决定正式注册小程序账号之前,或者仅仅只是想体验一下小程序(或小游戏 ...

  3. PhotoShop学习历程以及网站分享

    博主将开启为期两周的PhotoShop学习计划,今天是2021/7/25 仅仅是学习历程记录,与大家分享学习心得,分享觉得好的网站.如果有好的建议可以在底下留言,大家共同进步!         内容将 ...

  4. 【小白】【大学】一名嵌入式软件开发小白的单片机学习历程、心路历程、经验分享

    我的嵌入式学习之路 我为什么写这篇文章 先简单介绍一下我自己 与每一个技术小白共勉 这篇文章写给谁 我的学习经验分享 我的成长之路 我的单片机学习历程分享 51系列单片机学习历程 预备知识:(可以查百 ...

  5. ROS2 发展历程和开发环境安装

    ROS2养成计划(一)发展历程和开发环境安装 ROS发展历程介绍 2006 年,无比好奇的一群人走在一起,组建了一个机器人研究实验室:柳树车库(Willow Garage) 2010年5月26日,人类 ...

  6. Airtestpoco学习历程1——设备连接

    Airtest&poco学习历程1 一.设备连接 详情参考网易airtest官网教程 以下为网页原文: 模拟器连接:以网易的mumu模拟器为例 https://airtest.doc.io.n ...

  7. MySQL必知必会学习历程(一)

    MySQL必知必会学习历程(一) 前言 第1章 了解SQL 1.1 关键术语介绍 1.2 数据表解释实例 第2章 MySQL简介 2.1 关键术语介绍 2.2 安装mysql命令行实用程序(可选) 2 ...

  8. 分布式事务解决方案 - SpringCloud Alibaba Seata

    目录 github代码:GitHub - 18409489244/seata: 基于springcloud alibaba seata 的分布式事务demo 一.常见分布式事务解决方案 二.分布式事务 ...

  9. C语言学习历程--小项目篇(1)

    C语言学习历程–小项目篇–基于winpcap的UDP数据发送 开发环境介绍 1.操作系统:windows10(基于x64处理器).IDE:vs 2019(微软官网个人免费版).winpcap安装包及开 ...

  10. 人工神经网络与深度学习学习历程,心得及资料分享

    人工神经网络(Artificial Neural Network,即ANN ),是20世纪80 年代以来人工智能领域兴起的研究热点.它从信息处理角度对人脑神经元网络进行抽象, 建立某种简单模型,按不同 ...

最新文章

  1. requirejs搭建前端框架
  2. 关于java数据库章节connection连接不成功的时候!!!
  3. 任天堂经典拳击游戏可以体感操作了,打开网页就能玩,击败泰森不是梦
  4. artTemplate的使用总结
  5. 我是如何学习写一个操作系统(四):操作系统之系统调用
  6. vue e-charts按需引入
  7. Bootstrap 中: data-toggle 与 data-target 的作用
  8. 【kafka】Kafka常用JMX监控指标整理
  9. java innodb存储引擎_MySQL InnoDB存储引擎的事务隔离级别
  10. 使用php-fpm状态页观察当前的php-fpm状态
  11. liunx 下 php 的安装
  12. (十三)洞悉linux下的Netfilteriptables:为防火墙增添功能模块【实战】
  13. OpenCV-图像处理(07、绘制形状与文字)
  14. 微信与多闪之争背后,好友关系链到底是如何窃取的?
  15. html生成邮件签名之路(一)
  16. html5页面适配方法,H5案例分享:HTML5移动页面适配方法
  17. 完爆面试官!黑马学java学费多少
  18. 追梦之路-For the dream
  19. 【第六篇】Qt学习与使用---在qt中打印PDF文件(不是生成PDF)
  20. 小米Mix2s刷机教程

热门文章

  1. Could not find artifact com.oracle:ojdbc7:pom:12.1.0.2 in central (https://r......的解决方案
  2. Vivado:信道编码卷积编码和RS编码IP核
  3. 《程序化广告实战》一 1.1 常见的广告形式及业态
  4. 2017华为笔试题3
  5. 什么软件测试出来的网速准确,百度应用的网速测试工具最不准确
  6. flash mx拖拽实例_Flash MX 2004 Professional的百叶窗过渡效果
  7. 网络爬虫与信息提取学习笔记_02
  8. html鼠标爱心特效代码,鼠标点击爱心特效代码分享
  9. sqlserver大批量数据插入 BULK INSERT
  10. 魔百盒 UNT403A UNT413A S905L3A卡刷精简固--S905L3A