溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Mysql5.6出現(xiàn)數(shù)據(jù)庫配置參數(shù)異常應(yīng)該怎么處理

發(fā)布時間:2020-05-23 13:54:14 來源:網(wǎng)絡(luò) 閱讀:286 作者:三月 欄目:數(shù)據(jù)庫

本文主要給大家簡單講講Mysql5.6出現(xiàn)數(shù)據(jù)庫配置參數(shù)異常應(yīng)該怎么處理,相關(guān)專業(yè)術(shù)語大家可以上網(wǎng)查查或者找一些相關(guān)書籍補充一下,這里就不涉獵了,我們就直奔主題吧,希望Mysql5.6出現(xiàn)數(shù)據(jù)庫配置參數(shù)異常應(yīng)該怎么處理這篇文章可以給大家?guī)硪恍嶋H幫助。

一、環(huán)境描述

單機多實例,一主多從

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 列不應(yīng)該出現(xiàn)192.168.80.122 ,應(yīng)該是192.168.80.123,判斷應(yīng)該和復(fù)制相關(guān)的參數(shù)設(shè)置的

不爭取引起的。檢查參數(shù)文件即可。

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. 修改參數(shù)文件重啟數(shù)據(jù)庫,因為是一個slave 節(jié)點,沒有太大影響

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

第一種方式不行,直接修改參數(shù)文件吧,然后重啟搞定。

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

保存退出,重啟數(shù)據(jù)庫

這幾個參數(shù)之前沒有細(xì)研究,正好可以好好查看一下官方文檔。

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 VariableNamereport_host
Variable ScopeGlobal
Dynamic VariableNo
Permitted 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出現(xiàn)數(shù)據(jù)庫配置參數(shù)異常應(yīng)該怎么處理就先給大家講到這里,對于其它相關(guān)問題大家想要了解的可以持續(xù)關(guān)注我們的行業(yè)資訊。我們的板塊內(nèi)容每天都會捕捉一些行業(yè)新聞及專業(yè)知識分享給大家的。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI