Giter Site home page Giter Site logo

Comments (13)

ElderJames avatar ElderJames commented on May 22, 2024 1

Anyway, thanks again.

from mysqlcdc.

rusuly avatar rusuly commented on May 22, 2024

Hello James,

I assume you configured a new replica server(since there is a gap in GTIDs, 1-4050).
Could you please check gtid_executed and gtid_purged

select @@gtid_executed;
select @@gtid_purged;

If you configured your replica correctly the gtid_purged must be “1d8dab31-b1c3-11e9-bd4f-00155d452816:1-4050”

Have you also tried FromGtid(“1d8dab31-b1c3-11e9-bd4f-00155d452816:4051-4051”)?

from mysqlcdc.

ElderJames avatar ElderJames commented on May 22, 2024

Thank you for comment.

mysql> select @@gtid_executed;
+---------------------------------------------+
| @@gtid_executed |
+---------------------------------------------+
| 1d8dab31-b1c3-11e9-bd4f-00155d452816:1-4097 |
+---------------------------------------------+
1 row in set (0.04 sec)

mysql> select @@gtid_purged;
+---------------------------------------------+
| @@gtid_purged |
+---------------------------------------------+
| 1d8dab31-b1c3-11e9-bd4f-00155d452816:1-4050 |
+---------------------------------------------+
1 row in set (0.01 sec)

from mysqlcdc.

rusuly avatar rusuly commented on May 22, 2024

Ok, could you then try

  • FromGtid(“1d8dab31-b1c3-11e9-bd4f-00155d452816:4051-4051”)
  • FromGtid(“1d8dab31-b1c3-11e9-bd4f-00155d452816:4051-4096”)

from mysqlcdc.

ElderJames avatar ElderJames commented on May 22, 2024

I tried them but got the same error.😂

from mysqlcdc.

rusuly avatar rusuly commented on May 22, 2024

Ok, silly question, did you change the connection string(hostname) to your new replica?

from mysqlcdc.

ElderJames avatar ElderJames commented on May 22, 2024

No,I am using localhost to connect the MySQL on my dev PC.

image

from mysqlcdc.

rusuly avatar rusuly commented on May 22, 2024

Did you make a backup of your database and restore it on a new replica or you are just using the master server.
I just want to understand how your events got purged(because of expiration or because you configured a new replica)

from mysqlcdc.

ElderJames avatar ElderJames commented on May 22, 2024

Just using the master server.
I used to manually delete the binlog file when I needed to change the configuration. I don't know if that's the reason.

from mysqlcdc.

rusuly avatar rusuly commented on May 22, 2024

maybe something got corrupt(it's better you use PURGE BINARY LOGS in such cases)

you can try to reset GTID history and clear binlog but make sure you understand the reset master command

from mysqlcdc.

ElderJames avatar ElderJames commented on May 22, 2024

It work! So Amazing! Thanks a lot 🎁
There's a lot I don't know about binlog but I learned a lot from you.

from mysqlcdc.

rusuly avatar rusuly commented on May 22, 2024

AH, I JUST REALIZED what the problem was.
The correct answer was

FromGtid(“1d8dab31-b1c3-11e9-bd4f-00155d452816:1-4050”)`

In the FromGtid method you must pass your current state(your gtid_executed state).
This way you tell the server that you already executed transactions from 1 to 4050 so it will send you remaining interval from 4051 to 4097

You should have passed the @@gtid_purged value to the FromGtid which is equal to FromStart()

FromGtid(@@gtid_purged) => FromStart()
FromGtid(@@gtid_executed) => FromEnd()

from mysqlcdc.

ElderJames avatar ElderJames commented on May 22, 2024

Exactly, it works finally.

from mysqlcdc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.