当前位置: 首页 > news >正文

有了源代码如何做网站百度手机

有了源代码如何做网站,百度手机,佛山制作网站公司哪家好,网站建设工程属于科技档案吗准备使用集群的时候发现集群起不来, 发现抱错集群各个节点都是readonly 状态,找了很多资料,由于集群处于不一致的情况需要防止不同的节点数据写入脏数据 取消节点readonly 方法如下: MySQL 取消 super read only 直接关闭read…

准备使用集群的时候发现集群起不来,

发现抱错集群各个节点都是readonly 状态,找了很多资料,由于集群处于不一致的情况需要防止不同的节点数据写入脏数据

取消节点readonly 方法如下:

MySQL 取消 super read only

直接关闭read only 模式

SET GLOBAL super_read_only = OFF;

登录 mysqlsh  执行

dba.configureLocalInstance()

Dba.configureLocalInstance: This function is not available through a session to an instance belonging to an unmanaged asynchronous replication topology (RuntimeError)

shell.connect('root@node1:3306')
Creating a session to 'root@node1:3306'
Fetching schema names for autocompletion... Press ^C to stop.
Closing old connection...
Your MySQL connection id is 215
Server version: 8.0.30 MySQL Community Server - GPL
No default schema selected; type \use <schema> to set one.

看到一个帖子说创建了一个集群就好了

开始创建集群:

var cluster = dba.createCluster('testCluster')A new InnoDB Cluster will be created on instance 'node1:3306'.Disabling super_read_only mode on instance 'node1:3306'.
Validating instance configuration at node1:3306...This instance reports its own address as node1:3306Instance configuration is suitable.
NOTE: Group Replication will communicate with other members using 'node1:3306'. Use the localAddress option to override.Creating InnoDB Cluster 'testCluster' on 'node1:3306'...Adding Seed Instance...
NOTE: User 'mysql_innodb_cluster_1891693795'@'%' already existed at instance 'node1:3306'. It will be deleted and created again with a new password.
Cluster successfully created. Use Cluster.addInstance() to add MySQL instances.

创建成功,添加实例

cluster.addInstance('root@node2:3306');

结果报错: 

cluster.addInstance('root@node2:3306');WARNING: A GTID set check of the MySQL instance at 'node2:3306' determined that it contains transactions that do not originate from the cluster, which must be discarded before it can join the cluster.node2:3306 has the following errant GTIDs that do not exist in the cluster:
45fc6a70-48a9-11ed-adfc-000c29325d80:1WARNING: Discarding these extra GTID events can either be done manually or by completely overwriting the state of node2:3306 with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'.Having extra GTID events is not expected, and it is recommended to investigate this further and ensure that the data can be removed prior to choosing the clone recovery method.Please select a recovery method [C]lone/[A]bort (default Abort): C
Validating instance configuration at node2:3306...This instance reports its own address as node2:3306Instance configuration is suitable.
NOTE: Group Replication will communicate with other members using 'node2:3306'. Use the localAddress option to override.A new instance will be added to the InnoDB cluster. Depending on the amount of
data on the cluster this might take from a few seconds to several hours.Adding instance to the cluster...NOTE: User 'mysql_innodb_cluster_1780669600'@'%' already existed at instance 'node1:3306'. It will be deleted and created again with a new password.
Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background.
Clone based state recovery is now in progress.NOTE: A server restart is expected to happen as part of the clone process. If the
server does not support the RESTART command or does not come back after a
while, you may need to manually start it back.* Waiting for clone to finish...
NOTE: node2:3306 is being cloned from node1:3306
** Stage DROP DATA: Completed
** Clone Transfer  FILE COPY  ############################################################  100%  CompletedPAGE COPY  ############################################################  100%  CompletedREDO COPY  ############################################################  100%  CompletedNOTE: node2:3306 is shutting down...* Waiting for server restart... ready 
* node2:3306 has restarted, waiting for clone to finish...
** Stage RESTART: Completed
* Clone process has finished: 75.75 MB transferred in about 1 second (~75.75 MB/s)State recovery already finished for 'node2:3306'The instance 'node2:3306' was successfully added to the cluster.

实例中有的gts没同步过来,需要同步选择C 复制过来,第二个实例也添加成功了

再添加第三个实例

查看集群状态

cluster.status(); 

cluster.status();  
{"clusterName": "testCluster", "defaultReplicaSet": {"name": "default", "primary": "node1:3306", "ssl": "REQUIRED", "status": "OK", "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.", "topology": {"node1:3306": {"address": "node1:3306", "memberRole": "PRIMARY", "mode": "R/W", "readReplicas": {}, "replicationLag": "applier_queue_applied", "role": "HA", "status": "ONLINE", "version": "8.0.30"}, "node2:3306": {"address": "node2:3306", "memberRole": "SECONDARY", "mode": "R/O", "readReplicas": {}, "replicationLag": "applier_queue_applied", "role": "HA", "status": "ONLINE", "version": "8.0.30"}, "node3:3306": {"address": "node3:3306", "memberRole": "SECONDARY", "mode": "R/O", "readReplicas": {}, "replicationLag": "applier_queue_applied", "role": "HA", "status": "ONLINE", "version": "8.0.30"}}, "topologyMode": "Single-Primary"}, "groupInformationSourceMember": "node1:3306"
}

集群状态运行正常

http://www.shuangfujiaoyu.com/news/34474.html

相关文章:

  • 重庆可视化网站制作站长之家工具查询
  • 四川网站建设设计公司南京seo域名
  • html菜鸟教程代码昆明seo关键词排名
  • 商城类网站能做响应式设计吗友链申请
  • delphi xe10网站开发代发关键词排名包收录
  • 甘肃手机版建站系统价格网络推广工作好做不
  • 做外贸网站挣钱吗营销培训内容有哪些
  • 企业网站建设流程图郑州关键词排名公司电话
  • 用ci框架如何做动态网站广告网络推广
  • 做一个app大概需要多少费用seo怎么优化方案
  • 网站正能量网站不用下载直接进入十八未成年禁用免费app
  • 织梦安防网站源码如何快速被百度收录
  • 网站怎么做子网页百度网页推广费用
  • 峨山网站建设2021年经典营销案例
  • 徐州cms模板建站2023年广州疫情最新消息
  • 常见的网站攻击方式外贸平台有哪些比较好
  • 福田附近公司做网站建设多少钱怎么做关键词优化排名
  • 企业微网站与手机微信2022年列入传销组织最新骗法
  • 做试卷挣钱的网站黑马培训机构
  • 安阳网站公司哪家好怎么制作网站二维码
  • wordpress.org去除天津百度快速排名优化
  • 西京一师一优课建设网站深圳百度推广关键词推广
  • 网站开发需要什么人才自己怎么做关键词优化
  • 许昌网页制作拼多多关键词优化是怎么弄的
  • 怎么样做网站推广品牌网络营销成功案例
  • 网站销售如何做业绩百度seo优化是什么
  • 提供免费网站建设怎样开自己的网站
  • 合同 制作 网站如何在各大平台推广
  • 域名和主机有了怎么做网站代运营靠谱吗
  • 全媒体运营师证书怎么考单页网站seo如何优化