Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Howto change kingbus setting when real master mysql is down #23

Closed
bienkma opened this issue Feb 9, 2021 · 2 comments
Closed

Comments

@bienkma
Copy link

bienkma commented Feb 9, 2021

Hi there,

Sorry, I don't know where I should ask the question.

I had 3 nodes kingbus and 10 slaves node. Kingbus was binlog server real master A. Master B was a slave master A. Now, we have some issues with master A and we want to change the real master for kingbus cluster. Should we do now? What is the script in the situation?

+--------+                                                         +----------+
|master A| ------------replicated----------------------------------| master B |
+--------+                                                         +----------+
  ^
  |
  |

[ kingbus 1-3] <---------------------replicate [slave 1-10]

Thank you!

@bienkma bienkma changed the title [Question] Howto change kingbus setting for pointing to new real master node [Question] Howto change kingbus setting when real master mysql is down Feb 9, 2021
@michael-liumh
Copy link

I think you can stop the kindbus first, then start a new one. maybe you can use curl -X POST or PUT to update the syncer

@bienkma
Copy link
Author

bienkma commented May 12, 2021

Thank @Michaelsky0913 i have found my question. We used this transcription below:

  1. Stop syncer server via the command
    shell curl -H "Content-Type:application/json" -X PUT http://kingbus_0:5000/binlog/syncer/stop
  2. Change binlog server to new one
    shell curl -H "Content-Type:application/json" -X PUT --data '{"syncer_id":1107723,"syncer_uuid":"b85082dc-e833-4a41-8aeb-6effabf447c8","mysql_addr":"new_ip_master_db_server:3306","mysql_user":"kingbus","mysql_password":"change_me","semi_sync":false}' http://kingbus_0:5000/binlog/syncer/start
    If slave use GTID is replicate mode. It's will auto work.
    anw, thank you for your repling, that make me feeling that I'm not alone :)

@bienkma bienkma closed this as completed May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants