gpt4 book ai didi

Mysql Slave 不更新

转载 作者:可可西里 更新时间:2023-11-01 07:33:51 24 4
gpt4 key购买 nike

我已经设置了复制,一切看起来都很好我没有错误,但是数据没有被移动到从站

mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: xxxxx
Master_User: xxxxxx
Master_Port: xxxx
Connect_Retry: 30
Master_Log_File: mysql-bin.000006
Read_Master_Log_Pos: 98
Relay_Log_File: xxxxx-relay-bin.002649
Relay_Log_Pos: 235
Relay_Master_Log_File: mysql-bin.000006
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
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: 98
Relay_Log_Space: 235
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
1 row in set (0.00 sec)

最佳答案

在主数据库上运行show master statusshow master status\G。它会给你正确的值来更新你的奴隶。

从您的从站状态来看,您的从站似乎已成功连接到主站并正在等待日志事件。对我来说,这意味着您的从属用户已正确设置,并且具有正确的访问权限。看起来您真的只需要同步正确的日志文件位置。

小心,因为要获得良好的同步,您可能应该停止 master,转储 DB,记录 master 日志文件位置,然后启动 master,在 slave 上导入 DB,最后以 slave 模式启动 slave使用正确的主日志文件 pos。我已经这样做了大约 30 次,如果您不几乎完全按照这些步骤操作,您得到一个糟糕的同步。

关于Mysql Slave 不更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2388682/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com