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

Updated mysqld_multi script to be able to pass custom parameters to mysql #247

Closed
wants to merge 1 commit into from

Conversation

acampoh
Copy link

@acampoh acampoh commented Jan 25, 2019

This also allows to override values already defined in config if
needed without needing to touch the original config files.

…ysql.

This also allows to override values already defined in config if
needed without needing to touch the original config files.
@emottola
Copy link

emottola commented Jan 25, 2019

This is useful when a multi-instance MySQL server is used with async replication and/or with Galera libraries. For example to start a node without replication enabled, or bootstrap a new Galera cluster or to perform some special one-time operation like the wsrep-recovery.

Without this new feature we need to use a dedicated file per each instance when we need to perform that kind of operation, loosing the ability to manage all the instance with a single my.cnf file.

Starting a mysql async slave without replication enabled:
mysqld_multi start 1 --skip-slave-start

Bootstrapping a new Galera cluster can be done with this change very easily:
mysqld_multi start 1 --wsrep-new-cluster --wsrep_cluster_address='gcomm://'

In this case the parameters give by command line will override the ones in the my.cnf file, giving us the ability to not touch a working config file.

Perform a recovery of a desynced node become:
mysqld_multi start 1 --wsrep-recovery

We had the need to perform this kind of operations, sometimes during outages, so creating each time a dedicated config file that particular instance is not suitable, and as far I can see is the only solution at the moment.

We're already using this patch internally on all our MySQL multi-instance boxes, keeping one single my.cnf configuration file easy to read and maintain.

@mysql-oca-bot
Copy link

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at http://www.oracle.com/technetwork/community/oca-486395.html
Please make sure to include your MySQL bug system user (email) in the returned form.
Thanks

@acampoh
Copy link
Author

acampoh commented Jan 31, 2019

Done!

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@acampoh
Copy link
Author

acampoh commented Jan 31, 2019

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

1 similar comment
@emottola
Copy link

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=94154 for updates.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants