Not the answer you need?
Register and ask your own question!
Many Forum changes were implemented on Tue 22 Sep. Read about new Ranks, Scoring, and Reactions.
Email [email protected] for any comments or concerns.

How to properly block old MySQL from accidental starting when promoting servers

mysql.girlmysql.girl ContributorCurrent User Role Contributor
I want to brain storm how you would do to make sure MySQL doesn't start by accident when you want it to stay down...
I was thinking to move the my.cnf file else where ie /tmp
I am about to promote new Master and don't want old master to be brought up unless I manually allow it.

Our in house script might try to bring it up in the new cluster by accident but I want to BLOCK it from happening.

Is there any other way do halt/block mysql from starting either by other script or other DBA accidentally starting it.

Comments

  • matthewbmatthewb Senior [email protected] Percona Staff Role
    Hello mysql.girl,
    Typically you can just disable mysql using systemd (systemctl disable mysql). That would prevent systemd from starting MySQL. Another typical technique is to change mysql's port to something other than the standard 3306, for example, change it to 15432. In this case, mysql will start but no applications/slaves will know this random port so they won't connect. You can also set the parameter "skip-networking" which will turn off all TCP/IP related access. This still allows local socket access though. Finally, in your master, set the parameter "super_read_only=1". Again, mysql will start but absolutely NO WRITES will be allowed from ANYONE.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.