zoukankan      html  css  js  c++  java
  • 【mysql】做 mariadb 的备库无法启动

    mysql 5.7.25
    mariadb 10.3.15
    mariadb 做主库,mysql 做丛库,
    mysql 在启动的时候报错
    image

    uuid

    a、有关server_id的描述
    The server ID, used in replication to give each master and slave a unique identity. This variable is set
    by the --server-id option. For each server participating in replication, you should pick a
    positive integer in the range from 1 to 232– 1(2的32次方减1) to act as that server's ID.
    
    
    
    b、有关 server_uuid的描述
    Beginning with MySQL 5.6, the server generates a true UUID in addition to the --server-id
    supplied by the user. This is available as the global, read-only variable server_uuid(全局只读变量)
    
    When starting, the MySQL server automatically obtains a UUID as follows:
    a).  Attempt to read and use the UUID written in the file data_dir/auto.cnf (where data_dir is
    the server's data directory); exit on success.
    b). Otherwise, generate a new UUID and save it to this file, creating the file if necessary.
    The auto.cnf file has a format similar to that used for my.cnf or my.ini files. In MySQL 5.6,
    auto.cnf has only a single [auto] section containing a single server_uuid [1992] setting and
    value;  
    
    Important
    The auto.cnf file is automatically generated; you should not attempt to write
    or modify this file 
    
    Also beginning with MySQL 5.6, when using MySQL replication, masters and slaves know one
    another's UUIDs. The value of a slave's UUID can be seen in the output of SHOW SLAVE HOSTS. Once
    START SLAVE has been executed (but not before), the value of the master's UUID is available on the
    slave in the output of SHOW SLAVE STATUS.
    
    In MySQL 5.6.5 and later, a server's server_uuid is also used in GTIDs for transactions originating
    on that server. For more information, see Section 16.1.3, “Replication with Global Transaction
    
    大意就是从MySQL5.6开始,除了--server id之外,服务器还会生成一个真正的UUID
    由用户提供。这是作为全局只读变量serveru uuid提供的(全局只读变量)
    在启动时,MySQL服务器会自动获取UUID
    

    在 mysql 中查看是可以查到的 show variables like 'server_uuid';

    然鹅在 mariadb中是没有的,

    难办啊

    感谢 https://blog.csdn.net/qq_44895681/article/details/106574216 的解析

    如果是 mysql 之间做主从,如果是基于克隆主机做的操作的话可能冲突导致主从异常。
    所以在 mysql 备库配置的时候删除 auto.cnf 然后在做主从配置,

  • 相关阅读:
    wxGlade: a GUI builder for wxWidgets/wxPython
    wxPython or PyQt or PySide哪一个比较好
    wxpython学习笔记
    C++实现发送HTTP请求 CoderZh 博客园
    Lucene如何分布式(WWW与Lucene服务器分离)
    MVC中一个表单实现多个提交按钮(一个action搞定添删改)
    何为.Net Remoting
    Lucene实用的分词匹配
    我心中的核心组件(可插拔的AOP)~第十四回 全文检索架构~终于设计了一个自己满意的Lucene架构
    【学习opencv第五篇】霍夫线变换
  • 原文地址:https://www.cnblogs.com/cizao/p/14757747.html
Copyright © 2011-2022 走看看