Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with database configuration parameter exception in Mysql5.6

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly tells you how to deal with database configuration parameter anomalies in Mysql5.6. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article can bring some practical help to you how to deal with database configuration parameter anomalies in Mysql5.6.

I. description of the environment

Single machine with multiple instances, one master and multiple slaves

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)

2. Analysis

The Host column should not appear 192.168.80.122, but should be 192.168.80.123. It is determined that the parameters related to replication should be set.

I didn't fight for it. Just 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.01sec)

Third, solve the problem

Direct online modification

Modify the parameter file to restart the database, because it is a slave node, it does not have much impact

Mysql > set global report_host='192.168.80.122';ERROR 1238 (HY000): Variable 'report_host' is a read only variable

The first way is not good, just modify the parameter file, and then restart it.

Vi / etc/my3309.cnf report-host=192.168.80.123

Save exit and restart the database

These parameters have not been studied in detail before, so you can take a good look at the official documents.

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_nameSystem VariableNamereport_hostVariable ScopeGlobalDynamic VariableNoPermitted ValuesTypestring

The host name or IP address of the slave to be reported to the master during slave registration. This value appears in the output of SHOW SLAVE HOSTS on the master server. Leave the value unset if you do not want the slave to register itself with the master.

Mysql5.6 database configuration parameters should be abnormal how to deal with the first to tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report