溫馨提示×

溫馨提示×

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

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

Mysql5.6出現數據庫配置參數異常應該怎么處理

發布時間:2020-05-23 13:54:14 來源:網絡 閱讀:336 作者:三月 欄目:數據庫

本文主要給大家簡單講講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 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出現數據庫配置參數異常應該怎么處理就先給大家講到這里,對于其它相關問題大家想要了解的可以持續關注我們的行業資訊。我們的板塊內容每天都會捕捉一些行業新聞及專業知識分享給大家的。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女