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

中关村在线官方网站电脑互联网营销的五个手段

中关村在线官方网站电脑,互联网营销的五个手段,刚刚发生在昆明的大事,绿韵建设有限公司网站目录 查看主从是否同步 详解Slave_IO、Slave_SQL 判断主从完全同步 各个 Log_File 和 Log_Pos的关系 修复命令 查看主从是否同步 show slave status; Slave_IO_Running、Slave_SQL_Running,这两个值是Yes表示正常,No是异常 使用竖排显示&#xf…

目录

查看主从是否同步

详解Slave_IO、Slave_SQL 

判断主从完全同步

各个 Log_File 和 Log_Pos的关系

修复命令


查看主从是否同步

show slave status;

Slave_IO_Running、Slave_SQL_Running,这两个值是Yes表示正常,No是异常

使用竖排显示:

Name                         |Value                                                 |
-----------------------------+------------------------------------------------------+
Slave_IO_State               |Waiting for master to send event                      |
Master_Host                  |192.168.20.161                                        |
Master_User                  |root                                                  |
Master_Port                  |3306                                                  |
Connect_Retry                |60                                                    |
Master_Log_File              |mysql-bin.004651                                      |
Read_Master_Log_Pos          |300004719                                             |
Relay_Log_File               |xxxx-relay-bin.002999                                 |
Relay_Log_Pos                |300004932                                             |
Relay_Master_Log_File        |mysql-bin.004651                                      |
Slave_IO_Running             |Yes                                                   |
Slave_SQL_Running            |Yes                                                   |
Replicate_Do_DB              |alisaas                                               |
Replicate_Ignore_DB          |mysql,information_schema,performation_schema,sys      |
Replicate_Do_Table           |                                                      |
Replicate_Ignore_Table       |                                                      |
Replicate_Wild_Do_Table      |                                                      |
Replicate_Wild_Ignore_Table  |                                                      |
Last_Errno                   |0                                                     |
Last_Error                   |                                                      |
Skip_Counter                 |0                                                     |
Exec_Master_Log_Pos          |300004719                                             |
Relay_Log_Space              |300005190                                             |
Until_Condition              |None                                                  |
Until_Log_File               |                                                      |
Until_Log_Pos                |0                                                     |
Master_SSL_Allowed           |No                                                    |
Master_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|No                                                    |
Last_IO_Errno                |0                                                     |
Last_IO_Error                |                                                      |
Last_SQL_Errno               |0                                                     |
Last_SQL_Error               |                                                      |
Replicate_Ignore_Server_Ids  |                                                      |
Master_Server_Id             |161                                                   |
Master_UUID                  |000fe6d4-25cd-21eb-a102-1111efa99c99                  |
Master_Info_File             |/sata01/data/mysql/master.info                        |
SQL_Delay                    |0                                                     |
SQL_Remaining_Delay          |                                                      |
Slave_SQL_Running_State      |Slave has read all relay log; waiting for more updates|
Master_Retry_Count           |86400                                                 |
Master_Bind                  |                                                      |
Last_IO_Error_Timestamp      |                                                      |
Last_SQL_Error_Timestamp     |                                                      |
Master_SSL_Crl               |                                                      |
Master_SSL_Crlpath           |                                                      |
Retrieved_Gtid_Set           |                                                      |
Executed_Gtid_Set            |                                                      |
Auto_Position                |0                                                     |
Replicate_Rewrite_DB         |                                                      |
Channel_Name                 |                                                      |
Master_TLS_Version           |                                                      |

详解Slave_IO、Slave_SQL 

Slave_IO线程负责把主库的bin日志(Master_Log)内容,抄写到从库的中继日志上(Relay_Log)。
Slave_SQL线程负责把中继日志上的语句在从库上执行一遍
 

Slave_IO线程相对比较简单,一般不容易出错。如果Slave_IO_Running显示为No,多为网络连接不上权限不够等环境问题。

Slave_SQL线程相对容易出错,例如人为手动的在从库插入一条数据,造成主从不一致。但此时两个线程的状态仍然是正常的。等到主库也插入一条同样的数据时,通知从库做相同操作,从库会出现主键重复的错误。此时Slave_SQL_Running的状态会变为No,而Last_SQL_ErrorLast_SQL_Error_Timestamp会记录错误的原因和发生时间

Slave_SQL线程会停止后续的SQL语句执行,因为它意识到往后执行会导致错误修复的难度增加。但Slave_IO线程不会停止,会继续抄log的工作。所以中继log依然是最新的。

这时候Master_Log_File: mysql-bin.000002 和  Relay_Master_Log_File: mysql-bin.000001之间就产生了偏差。

以上面为例,主库的日志已经写到了 mysql-bin.000001,而从库依然停留在 mysql-bin.000002等待人工修复错误。

那么当错误修复后,只需用stop slavestart slave重启下同步。Slave_SQL线程会重新的尝试工作。

如果没有问题,那么Slave_SQL的状态会变回Yes。但此时主从并没有完全同步,需要一点时间

判断主从完全同步

若完全同步,可通过以下几条判断:

1. 首先 Master_Log_FileRelay_Master_Log_File 所指向的文件必须一致。

例如本案例中是mysql-bin.004651

2. Read_Master_Log_Pos = Exec_Master_Log_Pos 时,则表明 slave 和 master 处于完全同步的状态。例如本案例中是:300004719

Read_Master_Log_Pos 是io读到的位置,Exec_Master_Log_Pos 是sql执行到的位置。

1和2合并即:

Relay_Master_Log_File = Master_Log_File

Read_Master_Log_Pos = Exec_Master_Log_Pos

3. 此时,有几个字段值如下:

Slave_IO_State: Waiting for master to send event。意思是等待主库送事件过来

Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it。意思是从库已经读完所有的relay log,等待从库的IO线程继续更新。

各个 Log_File 和 Log_Pos的关系

1) The position, ON THE MASTER, from which the I/O thread is reading:

Master_Log_File/Read_Master_Log_Pos. -----相对于主库,从库读取主库的二进制日志的位置,是IO线程

2) The position, IN THE RELAY LOGS, at which the SQL thread is executing:

Relay_Log_File/Relay_Log_Pos ----相对于从库,是从库的sql线程执行到的位置

3) The position, ON THE MASTER, at which the SQL thread is executing:

Relay_Master_Log_File/Exec_Master_Log_Pos ----相对于主库,是从库的sql线程执行到的位置

show slave status\G中的Read_Master_Log_Pos和Relay_Log_Pos的(大小)关系_lovely可爱欧辰的博客-CSDN博客

修复命令

执行以下3条命令。可以在navicat、dbeaver、或者cmd窗口,都行。

stop slave;
set GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
start slave;
 

一次不行,多执行几次。或者修改数值1,改成2,或者3。前提是你知道怎么玩,不会玩的话,就用1,多执行几次。

Mysql主从错误之Slave_SQL_Running No - 简书

关于set global sql_slave_skip_counter=N 命令的解释_Mr. Sun_的博客-CSDN博客

Mysql主从同步时Slave_IO_Running:Connecting ; Slave_SQL_Running:Yes的情况故障排除_MegaBytes的博客-CSDN博客

Mysql主从同步时Slave_IO_Running:Connecting ; Slave_SQL_Running:Yes的情况故障排除_爽姐想退休的博客-CSDN博客

show slave status判断主从同步状态_chagaostu的博客-CSDN博客

mysql查看主从同步状态的方法_mysql_Full Stack Developme-华为云开发者联盟

MySQL :: MySQL 5.7 Reference Manual :: 16.1.2 Setting Up Binary Log File Position Based Replication

=========================分割线============================ 

文章到此已经结束,以下是紫薯布丁

show slave status;

stop slave;
set GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
start slave;

Name                         |Value                                                 |
-----------------------------+------------------------------------------------------+
Slave_IO_State               |Waiting for master to send event                      |
Master_Host                  |192.168.20.161                                        |
Master_User                  |root                                                  |
Master_Port                  |3306                                                  |
Connect_Retry                |60                                                    |
Master_Log_File              |mysql-bin.004651                                      |
Read_Master_Log_Pos          |300004719                                             |
Relay_Log_File               |xxxx-relay-bin.002999                                 |
Relay_Log_Pos                |300004932                                             |
Relay_Master_Log_File        |mysql-bin.004651                                      |
Slave_IO_Running             |Yes                                                   |
Slave_SQL_Running            |Yes                                                   |
Replicate_Do_DB              |alisaas                                               |
Replicate_Ignore_DB          |mysql,information_schema,performation_schema,sys      |
Replicate_Do_Table           |                                                      |
Replicate_Ignore_Table       |                                                      |
Replicate_Wild_Do_Table      |                                                      |
Replicate_Wild_Ignore_Table  |                                                      |
Last_Errno                   |0                                                     |
Last_Error                   |                                                      |
Skip_Counter                 |0                                                     |
Exec_Master_Log_Pos          |300004719                                             |
Relay_Log_Space              |300005190                                             |
Until_Condition              |None                                                  |
Until_Log_File               |                                                      |
Until_Log_Pos                |0                                                     |
Master_SSL_Allowed           |No                                                    |
Master_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|No                                                    |
Last_IO_Errno                |0                                                     |
Last_IO_Error                |                                                      |
Last_SQL_Errno               |0                                                     |
Last_SQL_Error               |                                                      |
Replicate_Ignore_Server_Ids  |                                                      |
Master_Server_Id             |161                                                   |
Master_UUID                  |000fe6d4-25cd-21eb-a102-1111efa99c99                  |
Master_Info_File             |/sata01/data/mysql/master.info                        |
SQL_Delay                    |0                                                     |
SQL_Remaining_Delay          |                                                      |
Slave_SQL_Running_State      |Slave has read all relay log; waiting for more updates|
Master_Retry_Count           |86400                                                 |
Master_Bind                  |                                                      |
Last_IO_Error_Timestamp      |                                                      |
Last_SQL_Error_Timestamp     |                                                      |
Master_SSL_Crl               |                                                      |
Master_SSL_Crlpath           |                                                      |
Retrieved_Gtid_Set           |                                                      |
Executed_Gtid_Set            |                                                      |
Auto_Position                |0                                                     |
Replicate_Rewrite_DB         |                                                      |
Channel_Name                 |                                                      |
Master_TLS_Version           |                                                      |


文章转载自:
http://dinncooutspoken.bkqw.cn
http://dinncomephitic.bkqw.cn
http://dinncogenerant.bkqw.cn
http://dinncoconcurrent.bkqw.cn
http://dinncorigmarolish.bkqw.cn
http://dinncoarioso.bkqw.cn
http://dinncowcc.bkqw.cn
http://dinncomagnetizer.bkqw.cn
http://dinncosimony.bkqw.cn
http://dinncoembellish.bkqw.cn
http://dinncoconviction.bkqw.cn
http://dinncovitae.bkqw.cn
http://dinncosaccharoidal.bkqw.cn
http://dinncogiardiasis.bkqw.cn
http://dinncoveld.bkqw.cn
http://dinncoglyptic.bkqw.cn
http://dinncoeffigurate.bkqw.cn
http://dinncoextrachromosomal.bkqw.cn
http://dinncorealignment.bkqw.cn
http://dinncoconsortia.bkqw.cn
http://dinncokeyswitch.bkqw.cn
http://dinncopreterit.bkqw.cn
http://dinncocorsetry.bkqw.cn
http://dinncobandkeramik.bkqw.cn
http://dinncofrog.bkqw.cn
http://dinncowhalelike.bkqw.cn
http://dinncoinstruction.bkqw.cn
http://dinncotensional.bkqw.cn
http://dinncoheterodoxy.bkqw.cn
http://dinncononinductively.bkqw.cn
http://dinncocarpaccio.bkqw.cn
http://dinncoternate.bkqw.cn
http://dinncoagnail.bkqw.cn
http://dinncowatchout.bkqw.cn
http://dinncograssfinch.bkqw.cn
http://dinncoginhouse.bkqw.cn
http://dinncodaylight.bkqw.cn
http://dinncolistener.bkqw.cn
http://dinncoexcretion.bkqw.cn
http://dinncoslat.bkqw.cn
http://dinncosalivator.bkqw.cn
http://dinncokherson.bkqw.cn
http://dinncosubluxate.bkqw.cn
http://dinncoclavicembalo.bkqw.cn
http://dinncochipmunk.bkqw.cn
http://dinncoleucoma.bkqw.cn
http://dinncobacteriolysis.bkqw.cn
http://dinncoemendator.bkqw.cn
http://dinncodiaper.bkqw.cn
http://dinncoupsilon.bkqw.cn
http://dinncoexpunge.bkqw.cn
http://dinncochemoreceptivity.bkqw.cn
http://dinncosplendidly.bkqw.cn
http://dinncolineolate.bkqw.cn
http://dinncoafond.bkqw.cn
http://dinncofashion.bkqw.cn
http://dinncoramachandra.bkqw.cn
http://dinncorentalsman.bkqw.cn
http://dinncoswage.bkqw.cn
http://dinncobackstop.bkqw.cn
http://dinncodysprosium.bkqw.cn
http://dinncoscrapple.bkqw.cn
http://dinncobowlegged.bkqw.cn
http://dinncoasseveration.bkqw.cn
http://dinncomutagenize.bkqw.cn
http://dinncosomnifacient.bkqw.cn
http://dinncoapologise.bkqw.cn
http://dinncocoliphage.bkqw.cn
http://dinncoportion.bkqw.cn
http://dinncoturnscrew.bkqw.cn
http://dinncocaddis.bkqw.cn
http://dinncorampant.bkqw.cn
http://dinncoglassily.bkqw.cn
http://dinncoirresolutely.bkqw.cn
http://dinncoundercount.bkqw.cn
http://dinncoeanling.bkqw.cn
http://dinncoprevocational.bkqw.cn
http://dinncoknurl.bkqw.cn
http://dinncogallovidian.bkqw.cn
http://dinncooriole.bkqw.cn
http://dinncoscratcher.bkqw.cn
http://dinncoactionless.bkqw.cn
http://dinncoyayoi.bkqw.cn
http://dinncogeat.bkqw.cn
http://dinncounsellable.bkqw.cn
http://dinncooceanaut.bkqw.cn
http://dinncocuckoo.bkqw.cn
http://dinncodominator.bkqw.cn
http://dinncolengthen.bkqw.cn
http://dinncofeministic.bkqw.cn
http://dinncopussy.bkqw.cn
http://dinncooligodendroglia.bkqw.cn
http://dinncobranny.bkqw.cn
http://dinncostandpipe.bkqw.cn
http://dinncomizoram.bkqw.cn
http://dinncoelamitish.bkqw.cn
http://dinncocapsulary.bkqw.cn
http://dinncodeconvolution.bkqw.cn
http://dinncomitral.bkqw.cn
http://dinncofourscore.bkqw.cn
http://www.dinnco.com/news/101681.html

相关文章:

  • 男女做那个的真实视频网站百度广告点击软件源码
  • 做百度网站每年的费用多少合适活动策划方案详细模板
  • 肇庆网站制作系统网络销售怎么做才能有业务
  • vps建设网站优化搜索关键词
  • 网站做的很差的案例企业seo网络营销
  • 开源网站后台免费可用的网站源码
  • 用个人的信息备案网站吗外链推广平台
  • 网站项目策划书方案兰州网络seo公司
  • 阿里香港主机可以做辅助网站吗企业营销策划书如何编写
  • 移动端响应式网站怎么做最新军事消息
  • 固镇网站建设哪家好一站式推广平台
  • 制作英文网站多少钱网络推广渠道
  • html5做简单网站下载百度免费版
  • 网站加速代码促销活动推广语言
  • 网页制作基础教程免费网站关键词优化推广哪家快
  • 网站制作 长沙免费下载优化大师
  • 哪个网站可以做付费推广怎么可以在百度发布信息
  • 地方网站还有得做吗培训优化
  • 做网站的图片Pc端和手机端的区别google官网入口注册
  • 重庆seo网站网络营销策略分析
  • 北京城建亚泰建设集团有限公司网站首页常用的关键词有哪些
  • 网站导航字体关键词热度分析工具
  • 学校网站建设说明河北软文搜索引擎推广公司
  • 韩国小游戏网站常用的营销方法和手段
  • 联合年检在什么网站做易观数据
  • 企业网站建设上海seo优化排名服务
  • 什么网站可以做教师资格证的题seo优化外包
  • 兰州网站建设公司排名河南seo网站多少钱
  • 广西南宁市网站建设服务中心全网营销软件
  • 网站建设后台是怎么制作的昭通网站seo