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

网站下面 备案网络推广代运营公司

网站下面 备案,网络推广代运营公司,建筑设计院,大鱼号自媒体平台GTID 定义 GTID 是 MySQL 事务标识#xff0c;为每一个提交的事务都生成一个标识#xff0c;并且是全局唯一的#xff0c;这个特性是从 MySQL5.6 引进的。 组成 GTID 是由 UUID TID#xff0c;UUID 是MySQL的唯一标识#xff0c;每个MySQL实例之间都是不同的。TID是代表… GTID 定义 GTID 是 MySQL 事务标识为每一个提交的事务都生成一个标识并且是全局唯一的这个特性是从 MySQL5.6 引进的。 组成 GTID 是由 UUID TIDUUID 是MySQL的唯一标识每个MySQL实例之间都是不同的。TID是代表了该实例上已经提交的事务数量并且随着 事务提交 单调递增。 优点 MySQL 主从 基于 GTID 复制不同于传统复制基于 binlog 日志位点。当主从切换时MySQL从节点 自动根据事务 在新主库上找到复制位点。GTID复制时会跳过已经执行过的事务。加强了数据库主备数据一致性。 搭建主从 主库数据备份 mysqldump -uroot -p123456 -h127.0.0.1 -P3307 --single-transaction --master-data2 --triggers --routines --all-databases /backup/all.sql 主从开启GTID 主从库 配置文件添加 gtid_mode on #开启gtid模式 enforce_gtid_consistency on #强制gtid一致性开启后对特定的create table不被支持 之后重启 主从 数据库 GTID验证 登录主从验证 mysql show variables like %gtid%; -------------------------------------------------------------- | Variable_name | Value | -------------------------------------------------------------- | binlog_gtid_simple_recovery | ON | | enforce_gtid_consistency | ON | | group_replication_allow_local_disjoint_gtids_join | OFF | | group_replication_gtid_assignment_block_size | 1000000 | | gtid_executed_compression_period | 1000 | | gtid_mode | ON | | gtid_next | AUTOMATIC | | gtid_owned | | | gtid_purged | | | session_track_gtids | OFF | -------------------------------------------------------------- 10 rows in set (0.01 sec)mysql show master status\G *************************** 1. row ***************************File: binlog.000016Position: 1658Binlog_Do_DB:Binlog_Ignore_DB: Executed_Gtid_Set: aadaaaaa-adda-adda-aaaa-aaaaaaddaaaa:1-52, b9193c37-89a7-11ee-8978-00155d68e7c7:1-9 1 row in set (0.00 sec) 可以看到GTID 开启后 执行 查看当前数据库状态。会多一个 Executed_Gtid_Set 指标 从库还原主库数据 rootLAPTOP-FPIQJ438:/usr/local/mysql-slave# mysql -uroot -p123456 -h127.0.0.1 -P3309 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.7.38-log MySQL Community Server (GPL)Copyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.Type help; or \h for help. Type \c to clear the current input statement.mysql mysql mysql mysql mysql source /backup/all.sql 主库创建复制用户 mysql create user fz% identified by 123456; Query OK, 0 rows affected (0.01 sec)mysql grant replication slave on *.* to fz%; Query OK, 0 rows affected (0.00 sec)mysql mysql mysql flush privileges; Query OK, 0 rows affected (0.01 sec) 从库开启复制 mysql stop slave; Query OK, 0 rows affected, 1 warning (0.00 sec)mysql mysql mysql mysql mysql reset slave ; Query OK, 0 rows affected (0.01 sec) mysql mysql mysql mysql change master to master_host127.0.0.1,master_userfz,MASTER_PORT3307,master_password123456,master_auto_position1; Query OK, 0 rows affected, 1 warning (0.03 sec)mysql mysql mysql mysql start slave; Query OK, 0 rows affected (0.01 sec) 可以看到 GTID 复制 不像 传统的基于binlog复制。不需要 binlog文件 和 pos位置位点 从库验证 mysql show slave status\G *************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 127.0.0.1Master_User: fzMaster_Port: 3307Connect_Retry: 60Master_Log_File: binlog.000016Read_Master_Log_Pos: 1658Relay_Log_File: LAPTOP-FPIQJ438-relay-bin.000002Relay_Log_Pos: 1777Relay_Master_Log_File: binlog.000016Slave_IO_Running: YesSlave_SQL_Running: YesReplicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table:Last_Errno: 0Last_Error:Skip_Counter: 0Exec_Master_Log_Pos: 1658Relay_Log_Space: 1986Until_Condition: NoneUntil_Log_File:Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_SSL_CA_File:Master_SSL_CA_Path:Master_SSL_Cert:Master_SSL_Cipher:Master_SSL_Key:Seconds_Behind_Master: 0 Master_SSL_Verify_Server_Cert: NoLast_IO_Errno: 0Last_IO_Error:Last_SQL_Errno: 0Last_SQL_Error:Replicate_Ignore_Server_Ids:Master_Server_Id: 2Master_UUID: b9193c37-89a7-11ee-8978-00155d68e7c7Master_Info_File: mysql.slave_master_infoSQL_Delay: 0SQL_Remaining_Delay: NULLSlave_SQL_Running_State: Slave has read all relay log; waiting for more updatesMaster_Retry_Count: 86400Master_Bind:Last_IO_Error_Timestamp:Last_SQL_Error_Timestamp:Master_SSL_Crl:Master_SSL_Crlpath:Retrieved_Gtid_Set: b9193c37-89a7-11ee-8978-00155d68e7c7:2-9Executed_Gtid_Set: 1d48af6d-89a9-11ee-a07d-00155d68e7c7:1-2, aadaaaaa-adda-adda-aaaa-aaaaaaddaaaa:1-52, b9193c37-89a7-11ee-8978-00155d68e7c7:1-9Auto_Position: 1Replicate_Rewrite_DB:Channel_Name:Master_TLS_Version: 1 row in set (0.00 sec) 可以看到 Slave_IO_Running 和 Slave_SQL_Running 均为 YES搭建成功
http://www.hkea.cn/news/14257330/

相关文章:

  • 网站备案关闭网站怎么做app和网站购物
  • 桂林网站建设内容提高百度快速排名
  • 网站建设源码安装教程辽宁建设执业继续教育协会网站
  • 再高权重网站加自己的链接会容易被收录吗做网站的基本步骤
  • 怎么用小皮创建网站wordpress怎么设置语言
  • 网站弹窗页面是谁做的什么样的公司需要做网站
  • 万网有网站建设吗做网站程序员都要先做维护么
  • 做网站的市场前景先做网站先备案
  • 多个端口网站如何做域名重定向手机系统下载
  • 网站建设服务费会计分录罗湖做网站的公司
  • 一个做智能化的网站有哪些广西住房和城乡建设厅网站首页
  • 建网站网络公司利用php做网站
  • 深圳做地铁的公司网站南京网站制作设计公司
  • 济南网站建设团队快速做网站
  • wordpress菜谱网站新津县建设局网站
  • 公司做哪个网站比较好做网站谈单
  • 企业为何选择网站推广外包?电脑上wap网站
  • 深圳市外贸网站Linux哪个版本做网站好
  • 网站开发可行性企业网站建设规划的基本原则有哪些
  • 做美团团购网站用那种语言做网站比较好
  • 企业免费建网站绵阳市建设银行网站
  • 网站建设备案优化之看WordPress文章设置时间免费
  • 关于棋牌游戏网站建设文案做文学类网站后期花费
  • 文化传媒可以做网站吗怎样在亚马逊上开自己的店铺
  • 盐城经济技术开发区建设局网站国外虚拟主机 两个网站
  • 网业公司搜索引擎优化seo课程总结
  • 做公众号必了解的网站做网站租服务器多少钱
  • 网站搜索优化找哪家活动策划案模板
  • 做代练去什么网站安全吗东莞网站建设方案
  • wordpress 首页打开慢青岛seo推广专员