在MySQL 5.6.2之前,slave记录的master信息以及slave应用binlog的信息存放在文件中,即master.info与relay-log.info。在5.6.2版本之后,允许记录到table中,参数设置如下: master-info-repository = TABLE ---FILE表示以文件方式 relay-log-info-repository = TABLE ---FILE表示以文件方式 对应的表分别为mysql.slave_master_info与mysql.slave_relay_log_info,且这两个表均为innodb引擎表。 mysql> select * from mysql.slave_master_info\G: *************************** 1. row *************************** Number_of_lines: 23 Master_log_name: mysql-bin.000129 Master_log_pos: 760146983 Host: 192.168.6.111 User_name: repl User_password: password Port: 3307 Connect_retry: 60 Enabled_ssl: 0 Ssl_ca: Ssl_capath: Ssl_cert: Ssl_cipher: Ssl_key: Ssl_verify_server_cert: 0 Heartbeat: 1800 Bind: Ignored_server_ids: 0 Uuid: 6c8a10ed-ed0b-11e4-91eb-00163ec546aa Retry_count: 86400 Ssl_crl: Ssl_crlpath: Enabled_auto_position: 1 1 row in set (0.07 sec) 并且你想要show slave hosts 从库还得设置更加精细的参数 report-host=192.168.6.111 report-port=3307
mysql数据库中的slave_开头的表
56,679
社区成员
56,709
社区内容
加载中
试试用AI创作助手写篇文章吧