I. Description of the Environment
Single-machine multi-instance, one master multi-slave
mysql> show slave hosts;+-----------+----------------+------+-----------+------------------- -------------------+| server_id | host | Port | Master_id | Slave_UUID |+-----------+----------------+------+-----------+--------------------------------------+| 3308 | 192.168.80.123 | 3308 | 3307 | e7bb816c-c823-11e6-abf0-00e06f68209e | | 3309 | 192.168.80.122 | 3309 | 3307 | c1039a79-c82b-11e6-ac23-00e06f68209e | | 10123 | 192.168.80.123 | 3306 | 3307 | a817b53d-5a23-11e6-9ea4-00e06f68209e |+-----------+-- --------------+------+-----------+--------------------------------------+3 rows in set ( 0.00 SEC)
Second, analysis
The Host column should not appear 192.168.80.122, it should be 192.168.80.123, and should be determined by the parameters that should be associated with the copy.
Not striving to cause. Check the parameter file.
Mysql> Show variables like ' report% '; +-----------------+----------------+| variable_name | Value |+-----------------+----------------+| Report_host | 192.168.80.122 | | Report_password | || Report_port | 3309 | | Report_user | |+-----------------+----------------+4 rows in Set (0.01 sec)
Third, solve the problem
Direct online Modification
Modify the parameter file to restart the database because it is a slave node with no significant impact
mysql> set global report_host= ' 192.168.80.122 '; ERROR 1238 (HY000): Variable ' Report_host ' is a read only Variable
The first way not, directly modify the parameter file, and then restart the fix.
VI/ETC/MY3309.CNF report-host=192.168.80.123
Save exit, restart database
These parameters have not been studied before, just to get a good look at the official documentation.
Http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#option_mysqld_report-host
--report-host=host_name
Command-Line Format |
--report-host=host_name |
System Variable |
Name |
report_host |
variable Scope |
global |
dynamic Variable |
no |
Permitted Values |
Type |
String |
The host name or IP address of the slave to is reported to the master during slave registration. This value is appears in the output of the SHOW SLAVE HOSTS
master server. Leave The value unset if you don't want the slave to register itself with the master.
This article is from the "ROIDBA" blog, make sure to keep this source http://roidba.blog.51cto.com/12318731/1886947
Mysql5.6 show slave hosts found database configuration parameter exceptions