outbrain / orchestrator

MySQL replication topology manager/visualizer
Other
829 stars 168 forks source link

Co-master empty name #81

Open wyhysj opened 9 years ago

wyhysj commented 9 years ago

Hi,

When I'm dragging a master to a slave making it co-master

The master will return

Last IO error Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated.

I think need to configure the default master_user & master_password

But the option is deprecated in MySQL 5.5

What am I missing, is it an alternative way to configure in orchestrator.conf.json?

shlomi-noach commented 9 years ago

Orchestrator does not know you replication username and password. It assumes your servers have that info. With regard turning a master into a slave, what we did at Outbrain was that the master was a slave of "", with credentials. Clearly it wouldn't replicate. Orchestrator accepts "" as a hint to "no master", and this way you can move everything anywhere. Now, the problem persists, since if you RESET SLAVE you lose it all again. I see a few options here:

On Tuesday, July 7, 2015, wyhysj notifications@github.com wrote:

Hi,

When I'm dragging a master to a slave making it co-master

The master will return

Last IO error Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated.

I think need to configure the default master_user & master_password

But the option is deprecated in MySQL 5.5

What am I missing, is it an alternative way to configure in orchestrator.conf.json?

— Reply to this email directly or view it on GitHub https://github.com/outbrain/orchestrator/issues/81.

wyhysj commented 9 years ago

Hi Shlomi Thanks for the quick reply, I think repository=table is a good way to do it. Though we have same replication user&password, but seems not elegent to set one username&password in orchestrator, I agree with you. Hope your update on orchestrator !

shlomi-noach commented 8 years ago

Insofar this has not been implemented yet; however a recent change at least makes it simpler to change co masters: assuming you already have a co-master configuration, it is possible to swap in a new co-master, replacing an existing one (via "-c make-co-master" command or via web interface in "Classic mode").

shlomi-noach commented 8 years ago

When using master_info_repository=TABLE and when orchestrator user has read privileges on mysql.slave_master_info, this issue is solved. Orchestrator attempts to read the replication credentials from mysql.slave_master_info on the slave, and if successful, uses those on the master.