微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Mysql5.6出现数据库配置参数异常应该怎么处理

本文主要给大家简单讲讲Mysql5.6出现数据库配置参数异常应该怎么处理,相关专业术语大家可以上网查查或者找一些相关书籍补充一下,这里就不涉猎了,我们就直奔主题吧,希望MysqL5.6出现数据库配置参数异常应该怎么处理这篇文章可以给大家带来一些实际帮助。

一、环境描述

单机多实例,一主多从

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)

二、分析 

Host 列不应该出现192.168.80.122 ,应该是192.168.80.123,判断应该和复制相关的参数设置的

不争取引起的。检查参数文件即可。

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)

三、解决问题

  1. 直接在线修改

  2. 修改参数文件重启数据库,因为是一个slave 节点,没有太大影响

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

第一种方式不行,直接修改参数文件吧,然后重启搞定。

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

保存退出,重启数据库

这几个参数之前没有细研究,正好可以好好查看一下官方文档。

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 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出现数据库配置参数异常应该怎么处理就先给大家讲到这里,对于其它相关问题大家想要了解的可以持续关注我们的行业资讯。我们的板块内容每天都会捕捉一些行业新闻及专业知识分享给大家的。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐