Background
After 5.5 upgrades to a set of database clusters to 5.6, Alter.log reported warning exception.
Copy Code code as follows:
2015-02-03 15:44:51 19633 [Warning] storing MySQL user name or password information in the master info repository isn't s Ecure and is therefore not recommended. Please consider using the "USER" and PASSWORD connection options for START SLAVE; The ' START SLAVE syntax\ ' in the MySQL Manual for more information.
Database Business pressure QPS 1 TPs is almost 0 4-10 seconds or more. There will be write operations.
"Analysis"
1 Master-slave replication information host address, port, replication user, Binlog file location information is stored in the Master.info, 5.6 version of security has done a lot of improvements, do not recommend the implementation of Change master when the password specified. 5.6 MySQL Prompts the above warning information if a password is set up when the master is built. This is why the cluster does not complain when it is in version 5.5.
2 The re-connection mechanism of MySQL replication
In a system that has already established a master-slave replication relationship, normally, a com_binlog_dump command is sent from the library to the main library, and the main library has a new Binlog event that sends Binlog to the repository. However, due to network failure or other reasons, the primary library is disconnected from the library or the main library has not sent Binlog to the library for a long time. For example, in this example, the database cluster is not written to about 10s, more than 4s of the slave_net_timeout setting, and a connection request is initiated from the library to the main library. 5.6 Version Slave initiate the request, MySQL will judge whether to use the plaintext password, if there is to send the above information to Error.log.
"Workaround"
In this case, you can try to resize the slave_net_timeout to a larger setting of 25. Slave_net_timeout is set after the binary Logs events that are confiscated from the main library in seconds, slave io threads reconnect to the main library when the network timeout is considered from the library. The default value for this parameter is 3600s, but too long can cause database latency or direct link exceptions from the main repository to be found in time. Setting the Slave_net_timeout very short will cause Master to be heavily connected when there is no data update. The general line is set to 5s.
Copy Code code as follows:
Set Global Slave_net_timeout = 25
Of course, can also communicate with the business side, for almost no access to the line of business offline, for the company to save resources.