MySQL HA的全新篇章:Semisynchronous Replication迁移至InnoDB Cluster的实用指南

MySQL InnoDB Replication部署方案与实践 阅读详情
1、概述

临时接了一个搭建InnoDB Cluster的活儿,客户给我说是有数据的,我当时想这不是非常简单吗?干活儿的时候,才发现并没有这么简单,接手的时候发现是Semisynchronous Replication的环境,然后把从库切换成InnoDB Cluster的primary。

2、环境复现
2.1、从库5.140信息采集
mysql> show replica status\G
*************************** 1. row ***************************
             Replica_IO_State: Waiting for source to send event
                  Source_Host: 192.168.5.130
                  Source_User: repuser
                  Source_Port: 3306
                Connect_Retry: 60
              Source_Log_File: mydb-binlog.000001
          Read_Source_Log_Pos: 342
               Relay_Log_File: mydb-relay.000002
                Relay_Log_Pos: 562
        Relay_Source_Log_File: mydb-binlog.000001
           Replica_IO_Running: Yes
          Replica_SQL_Running: Yes
...
1 row in set (0.00 sec)


mysql> select PLUGIN_NAME,PLUGIN_STATUS from information_schema.plugins where plugin_name like '%semi%';
+----------------------+---------------+
| PLUGIN_NAME          | PLUGIN_STATUS |
+----------------------+---------------+
| rpl_semi_sync_master | ACTIVE        |
| rpl_semi_sync_slave  | ACTIVE        |
+----------------------+---------------+
2 rows in set (0.00 sec)

mysql>
mysql>
mysql> show variables like '%semi_sync%';
+-------------------------------------------+------------+
| Variable_name                             | Value      |
+-------------------------------------------+------------+
| rpl_semi_sync_master_enabled              | ON         |
| rpl_semi_sync_master_timeout              | 5000       |
| rpl_semi_sync_master_trace_level          | 32         |
| rpl_semi_sync_master_wait_for_slave_count | 1          |
| rpl_semi_sync_master_wait_no_slave        | ON         |
| rpl_semi_sync_master_wait_point           | AFTER_SYNC |
| rpl_semi_sync_slave_enabled               | ON         |
| rpl_semi_sync_slave_trace_level           | 32         |
+-------------------------------------------+------------+
8 rows in set (0.00 sec)

mysql>
mysql>
mysql> show plugins;
+----------------------------------+----------+--------------------+--------------------+---------+
| Name                             | Status   | Type               | Library            | License |
+----------------------------------+----------+--------------------+--------------------+---------+
...
| rpl_semi_sync_master             | ACTIVE   | REPLICATION        | semisync_master.so | GPL     |
| rpl_semi_sync_slave              | ACTIVE   | REPLICATION        | semisync_slave.so  | GPL     |
+----------------------------------+----------+--------------------+--------------------+---------+
50 rows in set (0.00 sec)

mysql> select PLUGIN_NAME,PLUGIN_STATUS from information_schema.plugins where plugin_name like '%semi%';
+----------------------+---------------+
| PLUGIN_NAME          | PLUGIN_STATUS |
+----------------------+---------------+
| rpl_semi_sync_master | ACTIVE        |
| rpl_semi_sync_slave  | ACTIVE        |
+----------------------+---------------+
2 rows in set (0.00 sec)
2.2、从库5.140 InnoDB Cluster准备工作
mysql> stop replica;
Query OK, 0 rows affected (0.00 sec)


mysql> show replica status\G
*************************** 1. row ***************************
             Replica_IO_State:
                  Source_Host: 192.168.5.130
                  Source_User: repuser
                  Source_Port: 3306
                Connect_Retry: 60
              Source_Log_File: mydb-binlog.000001
          Read_Source_Log_Pos: 342
               Relay_Log_File: mydb-relay.000002
                Relay_Log_Pos: 562
        Relay_Source_Log_File: mydb-binlog.000001
           Replica_IO_Running: No
          Replica_SQL_Running: No
      
1 row in set (0.00 sec)

mysql>

mysql> show variables like '%read_only%';
+-----------------------------------------+---------------------------+
| Variable_name                           | Value                     |
+-----------------------------------------+---------------------------+
| read_only                               | ON                        |
| super_read_only                         | OFF                       |
+-----------------------------------------+---------------------------+
2 rows in set (0.00 sec)

mysql> \q
Bye
2.3、从库5.140参数调整
[root@mydb02 ~]# vi /mysql/data/my.cnf

这里只调整了read_only

2.4、踩坑–从库5.140搭建InnoDB Cluster
2.4.1、InnoDB Cluster配置与检查
[root@mydb02 ~]# mysqlsh
MySQL Shell 8.3.0

Copyright (c) 2016, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.

Type '\help' or '\?' for help; '\quit' to exit.
Creating a Classic session to 'root@localhost'
Fetching schema names for auto-completion... Press ^C to stop.
Your MySQL connection id is 21
Server version: 8.0.36 MySQL Community Server - GPL
No default schema selected; type \use <schema> to set one.
 MySQL  localhost  JS >
 MySQL  localhost  JS >
 MySQL  localhost  JS >
 MySQL  localhost  JS > \sql show databases;
Fetching global names for auto-completion... Press ^C to stop.
+--------------------+
| Database           |
+--------------------+
| db01               |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.0005 sec)
 MySQL  localhost  JS > dba.checkInstanceConfiguration('root@192.168.5.140')
Please provide the password for 'root@192.168.5.140': ****
Save password for 'root@192.168.5.140'? [Y]es/[N]o/Ne[v]er (default No): Y
Validating local MySQL instance listening at port 3306 for use in an InnoDB Cluster...

This instance reports its own address as mydb02:3306
Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.
NOTE: Found unexpected replication channel '' at mydb02:3306
WARNING: The instance 'mydb02:3306' cannot be added to an InnoDB cluster because it has asynchronous (source-replica) replication channel(s) configured. MySQL InnoDB Cluster does not support manually configured channels as they are not managed using the AdminAPI (e.g. when PRIMARY moves to another member) which may cause cause replication to break or even create split-brain scenarios (data loss).

Checking whether existing tables comply with Group Replication requirements...
No incompatible tables detected

Checking instance configuration...

NOTE: Some configuration options need to be fixed:
+----------------------------------------+---------------+----------------+----------------------------+
| Variable                               | Current Value | Required Value | Note                       |
+----------------------------------------+---------------+----------------+----------------------------+
| binlog_transaction_dependency_tracking | COMMIT_ORDER  | WRITESET       | Update the server variable |
+----------------------------------------+---------------+----------------+----------------------------+

NOTE: Please use the dba.configureInstance() command to repair these issues.

{
    "config_errors": [
        {
            "action": "server_update",
            "current": "COMMIT_ORDER",
            "option": "binlog_transaction_dependency_tracking",
            "required": "WRITESET"
        }
    ],
    "status": "error"
}

这里出现了WARNING,原因也讲了

WARNING: The instance 'mydb02:3306' cannot be added to an InnoDB cluster because it has asynchronous (source-replica) replication channel(s) configured. MySQL InnoDB Cluster does not support manually configured channels as they are not managed using the AdminAPI (e.g. when PRIMARY moves to another member) which may cause cause replication to break or even create split-brain scenarios (data loss).

尝试配置这个实例

 MySQL  localhost  JS >
 MySQL  localhost  JS >
 MySQL  localhost  JS > dba.configureInstance('root@192.168.5.140')
Dba.configureInstance: This function is not available through a session to an instance belonging to an unmanaged asynchronous replication topology (RuntimeError)

提示IC的命令不能管理asynchronous replication

2.4.2、插件处理

首先怀疑是插件的问题,然后卸载插件

MySQL  localhost  JS > \sql select PLUGIN_NAME,PLUGIN_STATUS from information_schema.plugins where plugin_name like '%semi%';
+----------------------+---------------+
| PLUGIN_NAME          | PLUGIN_STATUS |
+----------------------+---------------+
| rpl_semi_sync_master | ACTIVE        |
| rpl_semi_sync_slave  | ACTIVE        |
+----------------------+---------------+
2 rows in set (0.0010 sec)

 MySQL  localhost  JS > \sql uninstall plugin rpl_semi_sync_master;
Query OK, 0 rows affected (0.0026 sec)
 MySQL  localhost  JS > \sql uninstall plugin rpl_semi_sync_slave;
Query OK, 0 rows affected (0.0011 sec)

最后发现这个插件的卸载是非必须的

2.4.3、踩坑–再次尝试配置与检查
 MySQL  localhost  JS > dba.checkInstanceConfiguration('root@192.168.5.140')
Validating local MySQL instance listening at port 3306 for use in an InnoDB Cluster...

This instance reports its own address as mydb02:3306
Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.
NOTE: Found unexpected replication channel '' at mydb02:3306
WARNING: The instance 'mydb02:3306' cannot be added to an InnoDB cluster because it has asynchronous (source-replica) replication channel(s) configured. MySQL InnoDB Cluster does not support manually configured channels as they are not managed using the AdminAPI (e.g. when PRIMARY moves to another member) which may cause cause replication to break or even create split-brain scenarios (data loss).

Checking whether existing tables comply with Group Replication requirements...
No incompatible tables detected

Checking instance configuration...

NOTE: Some configuration options need to be fixed:
+----------------------------------------+---------------+----------------+----------------------------+
| Variable                               | Current Value | Required Value | Note                       |
+----------------------------------------+---------------+----------------+----------------------------+
| binlog_transaction_dependency_tracking | COMMIT_ORDER  | WRITESET       | Update the server variable |
+----------------------------------------+---------------+----------------+----------------------------+

NOTE: Please use the dba.configureInstance() command to repair these issues.

{
    "config_errors": [
        {
            "action": "server_update",
            "current": "COMMIT_ORDER",
            "option": "binlog_transaction_dependency_tracking",
            "required": "WRITESET"
        }
    ],
    "status": "error"
}

再次失败,得到了相同的信息

2.4.4、处理replica信息

因为是Semisynchronous Replication,所以前面处理了plugin,没有成功,所以排除法想到处理replica。

 MySQL  localhost  JS > \sql reset replica;
Query OK, 0 rows affected (0.0106 sec)
2.4.5、再次踩坑-再次检查
MySQL  localhost  JS > dba.checkInstanceConfiguration('root@192.168.5.140')
Validating local MySQL instance listening at port 3306 for use in an InnoDB Cluster...

This instance reports its own address as mydb02:3306
Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.
NOTE: Found unexpected replication channel '' at mydb02:3306
WARNING: The instance 'mydb02:3306' cannot be added to an InnoDB cluster because it has asynchronous (source-replica) replication channel(s) configured. MySQL InnoDB Cluster does not support manually configured channels as they are not managed using the AdminAPI (e.g. when PRIMARY moves to another member) which may cause cause replication to break or even create split-brain scenarios (data loss).

Checking whether existing tables comply with Group Replication requirements...
No incompatible tables detected

Checking instance configuration...

NOTE: Some configuration options need to be fixed:
+----------------------------------------+---------------+----------------+----------------------------+
| Variable                               | Current Value | Required Value | Note                       |
+----------------------------------------+---------------+----------------+----------------------------+
| binlog_transaction_dependency_tracking | COMMIT_ORDER  | WRITESET       | Update the server variable |
+----------------------------------------+---------------+----------------+----------------------------+

NOTE: Please use the dba.configureInstance() command to repair these issues.

{
    "config_errors": [
        {
            "action": "server_update",
            "current": "COMMIT_ORDER",
            "option": "binlog_transaction_dependency_tracking",
            "required": "WRITESET"
        }
    ],
    "status": "error"
}
2.4.6、再次处理replica

上一步中忘记去核对replica的信息了,这里检查下,发现replica的信息依然存在

 MySQL  localhost  JS > \sql show replica status\G
*************************** 1. row ***************************
             Replica_IO_State:
                  Source_Host: 192.168.5.130
                  Source_User: repuser
                  Source_Port: 3306
                Connect_Retry: 60
              Source_Log_File:
          Read_Source_Log_Pos: 4
               Relay_Log_File: mydb-relay.000001
                Relay_Log_Pos: 4
        Relay_Source_Log_File:
           Replica_IO_Running: No
          Replica_SQL_Running: No
...
1 row in set (0.0004 sec)

再次处理,reset all

 MySQL  localhost  JS > \sql reset replica all;
Query OK, 0 rows affected (0.0021 sec)

replica info 检查

 MySQL  localhost  JS > \sql show replica status\G
Empty set (0.0004 sec)

InnoDB Cluster Check检查

MySQL  localhost  JS > dba.checkInstanceConfiguration('root@192.168.5.140')
Validating local MySQL instance listening at port 3306 for use in an InnoDB Cluster...

This instance reports its own address as mydb02:3306
Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.

Checking whether existing tables comply with Group Replication requirements...
No incompatible tables detected

Checking instance configuration...

NOTE: Some configuration options need to be fixed:
+----------------------------------------+---------------+----------------+----------------------------+
| Variable                               | Current Value | Required Value | Note                       |
+----------------------------------------+---------------+----------------+----------------------------+
| binlog_transaction_dependency_tracking | COMMIT_ORDER  | WRITESET       | Update the server variable |
+----------------------------------------+---------------+----------------+----------------------------+

NOTE: Please use the dba.configureInstance() command to repair these issues.

{
    "config_errors": [
        {
            "action": "server_update",
            "current": "COMMIT_ORDER",
            "option": "binlog_transaction_dependency_tracking",
            "required": "WRITESET"
        }
    ],
    "status": "error"
}

ok,得到了想要的结果,虽然status是error,但是检查的结果告诉我们是一些参数问题。

2.4.7、最简单的IC搭建方法

自动配置实例,创建集群,使用API就可以完成,不赘述了

MySQL  localhost  JS > dba.configureInstance('root@192.168.5.140')
Configuring local MySQL instance listening at port 3306 for use in an InnoDB Cluster...

This instance reports its own address as mydb02:3306
Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.

applierWorkerThreads will be set to the default value of 4.

NOTE: Some configuration options need to be fixed:
+----------------------------------------+---------------+----------------+----------------------------+
| Variable                               | Current Value | Required Value | Note                       |
+----------------------------------------+---------------+----------------+----------------------------+
| binlog_transaction_dependency_tracking | COMMIT_ORDER  | WRITESET       | Update the server variable |
+----------------------------------------+---------------+----------------+----------------------------+

Do you want to perform the required configuration changes? [y/n]: y
Configuring instance...

WARNING: '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release. (Code 1287).
The instance 'mydb02:3306' was configured to be used in an InnoDB Cluster.

创建集群

 MySQL  localhost  JS > var mycluster=dba.createCluster('demoCluster')
A new InnoDB Cluster will be created on instance 'mydb02:3306'.

Validating instance configuration at /tmp%2Fmysql.sock...

This instance reports its own address as mydb02:3306

Instance configuration is suitable.
NOTE: Group Replication will communicate with other members using 'mydb02:3306'. Use the localAddress option to override.

* Checking connectivity and SSL configuration...

Creating InnoDB Cluster 'demoCluster' on 'mydb02:3306'...

Adding Seed Instance...
Cluster successfully created. Use Cluster.addInstance() to add MySQL instances.
At least 3 instances are needed for the cluster to be able to withstand up to
one server failure.
2.4.8、添加实例

这里添加的是Semisynchronous Replication中的主,以验证插件不会影响IC的搭建

 MySQL  localhost  JS > mycluster.addInstance('root@192.168.5.130')
ERROR: Unable to connect to the target instance '192.168.5.130'. Please verify the connection settings, make sure the instance is available and try again.
Cluster.addInstance: Could not open connection to '192.168.5.130': Can't connect to MySQL server on '192.168.5.130:3306' (111) (MySQL Error 2003)
 MySQL  localhost  JS > mycluster.addInstance('root@192.168.5.130')
The safest and most convenient way to provision a new instance is through automatic clone provisioning, which will completely overwrite the state of 'mydb01:3306' with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'.

The incremental state recovery may be safely used if you are sure all updates ever executed in the cluster were done with GTIDs enabled, there are no purged transactions and the new instance contains the same GTID set as the cluster or a subset of it. To use this method by default, set the 'recoveryMethod' option to 'incremental'.

Incremental state recovery was selected because it seems to be safely usable.

Validating instance configuration at 192.168.5.130:3306...

This instance reports its own address as mydb01:3306

NOTE: Some configuration options need to be fixed:
+----------------------------------------+---------------+----------------+----------------------------+
| Variable                               | Current Value | Required Value | Note                       |
+----------------------------------------+---------------+----------------+----------------------------+
| binlog_transaction_dependency_tracking | COMMIT_ORDER  | WRITESET       | Update the server variable |
+----------------------------------------+---------------+----------------+----------------------------+

NOTE: Please use the dba.configureInstance() command to repair these issues.

ERROR: Instance must be configured and validated with dba.checkInstanceConfiguration() and dba.configureInstance() before it can be used in an InnoDB cluster.
Cluster.addInstance: Instance check failed (RuntimeError)
 MySQL  localhost  JS > dba.checkInstanceConfiguration('root@192.168.5.130')
Please provide the password for 'root@192.168.5.130': ****
Save password for 'root@192.168.5.130'? [Y]es/[N]o/Ne[v]er (default No): Y
Validating MySQL instance at mydb01:3306 for use in an InnoDB Cluster...

This instance reports its own address as mydb01:3306
Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.

Checking whether existing tables comply with Group Replication requirements...
No incompatible tables detected

Checking instance configuration...

NOTE: Some configuration options need to be fixed:
+----------------------------------------+---------------+----------------+----------------------------+
| Variable                               | Current Value | Required Value | Note                       |
+----------------------------------------+---------------+----------------+----------------------------+
| binlog_transaction_dependency_tracking | COMMIT_ORDER  | WRITESET       | Update the server variable |
+----------------------------------------+---------------+----------------+----------------------------+

NOTE: Please use the dba.configureInstance() command to repair these issues.

{
    "config_errors": [
        {
            "action": "server_update",
            "current": "COMMIT_ORDER",
            "option": "binlog_transaction_dependency_tracking",
            "required": "WRITESET"
        }
    ],
    "status": "error"
}
 MySQL  localhost  JS > dba.configureInstance()('root@192.168.5.130')
The instance 'mydb02:3306' belongs to an InnoDB Cluster.
Configuring local MySQL instance listening at port 3306 for use in an InnoDB Cluster...

This instance reports its own address as mydb02:3306
Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.

applierWorkerThreads will be set to the default value of 4.

The instance 'mydb02:3306' is valid for InnoDB Cluster usage.
WARNING: The changes on the value of replica_parallel_workers will only take place after the instance leaves and rejoins the Cluster.

Successfully set the value of replica_parallel_workers.
TypeError: dba.configureInstance(...) is not a function
 MySQL  localhost  JS > dba.configureInstance('root@192.168.5.130')
Configuring MySQL instance at mydb01:3306 for use in an InnoDB Cluster...

This instance reports its own address as mydb01:3306
Clients and other cluster members will communicate with it through this address by default. If this is not correct, the report_host MySQL system variable should be changed.

applierWorkerThreads will be set to the default value of 4.

NOTE: Some configuration options need to be fixed:
+----------------------------------------+---------------+----------------+----------------------------+
| Variable                               | Current Value | Required Value | Note                       |
+----------------------------------------+---------------+----------------+----------------------------+
| binlog_transaction_dependency_tracking | COMMIT_ORDER  | WRITESET       | Update the server variable |
+----------------------------------------+---------------+----------------+----------------------------+

Do you want to perform the required configuration changes? [y/n]: y
Configuring instance...

WARNING: '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release. (Code 1287).
The instance 'mydb01:3306' was configured to be used in an InnoDB Cluster.
 MySQL  localhost  JS > mycluster.addInstance('root@192.168.5.130')
The safest and most convenient way to provision a new instance is through automatic clone provisioning, which will completely overwrite the state of 'mydb01:3306' with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'.

The incremental state recovery may be safely used if you are sure all updates ever executed in the cluster were done with GTIDs enabled, there are no purged transactions and the new instance contains the same GTID set as the cluster or a subset of it. To use this method by default, set the 'recoveryMethod' option to 'incremental'.

Incremental state recovery was selected because it seems to be safely usable.

Validating instance configuration at 192.168.5.130:3306...

This instance reports its own address as mydb01:3306

Instance configuration is suitable.
NOTE: Group Replication will communicate with other members using 'mydb01:3306'. Use the localAddress option to override.

* Checking connectivity and SSL configuration...

A new instance will be added to the InnoDB Cluster. Depending on the amount of
data on the cluster this might take from a few seconds to several hours.

Adding instance to the cluster...

Monitoring recovery process of the new cluster member. Press ^C to stop monitoring and let it continue in background.
Incremental state recovery is now in progress.

* Waiting for distributed recovery to finish...
  NOTE: 'mydb01:3306' is being recovered from 'mydb02:3306'
* Distributed recovery has finished

The instance 'mydb01:3306' was successfully added to the cluster.
2.4.9、集群状态检查
 MySQL  localhost  JS > mycluster.status()
{
    "clusterName": "demoCluster",
    "defaultReplicaSet": {
        "name": "default",
        "primary": "mydb02:3306",
        "ssl": "REQUIRED",
        "status": "OK_NO_TOLERANCE",
        "statusText": "Cluster is NOT tolerant to any failures.",
        "topology": {
            "mydb01:3306": {
                "address": "mydb01:3306",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.36"
            },
            "mydb02:3306": {
                "address": "mydb02:3306",
                "memberRole": "PRIMARY",
                "mode": "R/W",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.36"
            }
        },
        "topologyMode": "Single-Primary"
    },
    "groupInformationSourceMember": "mydb02:3306"
}
 MySQL  localhost  JS >

至此,完成Semisynchronous Replication到InnoDB Cluster的切换。

3、总结

从操作过程查看时reset replica和reset replica all的区别。

那么这两个参数有什么区别呢?直接上官网给答案。

RESET REPLICA does not change any replication connection parameters, which include the source’s host name and port, the replication user account and its password,

the PRIVILEGE_CHECKS_USER account, the REQUIRE_ROW_FORMAT option, the REQUIRE_TABLE_PRIMARY_KEY_CHECK option,and the ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS option. If you want to change any of the replication connection parameters, you can do this using a CHANGE REPLICATION SOURCE TO statement (from MySQL 8.0.23) or CHANGE MASTER TO statement (before MySQL 8.0.23) after the server start.

If you want to remove all of the replication connection parameters, use RESET REPLICA ALL.

RESET REPLICA ALL also clears the IGNORE_SERVER_IDS list set by CHANGE REPLICATION SOURCE TO | CHANGE MASTER TO. When you have used RESET REPLICA ALL, if you want to use the instance as a replica again, you need to issue a CHANGE REPLICATION SOURCE TO | CHANGE MASTER TO statement after the server start to specify new connection parameters.

划分了一下重点,其实就是replication connection parameters的处理。

完成,收钱!

SpringBoot+Vue+MySQL 高校学科竞赛平台 完整可运行版(源码+文档) 本项目基于SpringBoot+Vue+MySQL构建高校学科竞赛管理平台,覆盖学生、教师、领队教师、管理员四大角色,实现竞赛发布、报名、刷题、评分、公示等全流程闭环管理。系统架构清晰,技术主流,配套完整源码、数据库脚本、万字论文、开题报告、答辩PPT及部署文档,支持一键运行,适用于毕业设计、课程设计及院系二次开发,真正实现“开箱即用”。 阅读详情

相关推荐

SpringBoot+Vue+MySQL 民宿在线预定平台 完整可运行版(源码+文档)

本文介绍一套基于SpringBoot+Vue+MySQL的民宿在线预订平台,涵盖用户与管理员双角色全流程功能,实现房源展示、订单管理、支付模拟、数据看板等闭环业务。系统架构清晰,前后端分离,附带完整源码、数据库脚本、万字论文、答辩PPT及部署文档,适合毕设、课程设计或小型民宿二次开发,开箱即用,快速落地。

招风的黑耳优快云 193

MySQL服务器安装(Linux)

1MySQL集群的管理客户端,用户对MySQL集群的配置和管理下载地址1。

IT枫斗者的博客 1031

大语言模型在建筑规范自动化合规审查中的微调策略与规模效应实践

大语言模型(LLM)通过在海量文本数据上预训练,具备了强大的语言理解和生成能力。其核心原理是基于Transformer架构,通过自注意力机制捕捉长距离依赖关系。在工程实践中,为了将这种通用能力适配到建筑、法律、金融等高度专业化的垂直领域,通常需要采用领域微调技术。微调通过使用特定领域的高质量指令数据对模型参数进行更新,使其掌握专业术语、逻辑规则和任务范式,从而解决通用模型在专业场景下知识匮乏和“幻觉”问题。结合检索增强生成(RAG)技术,将动态外部知识库作为模型的“参考手册”,能进一步提升事实准确性并降低幻

weixin_30667831的博客 367

InnoDB Cluster 详解

InnoDB Cluster 简介、创建 InnoDB Cluster、使用 MySQL Shell 管理 InnoDB Cluster

wzy0623的专栏 1万+

WRF和WPS模型在Ubuntu系统上的安装与常见问题解决指南

本文详细介绍了在Ubuntu系统上安装WRF和WPS模型的完整教程,涵盖系统环境配置、依赖库安装、源代码编译以及常见问题的解决方案。重点解决了WPS编译中intmath.f文件的修改、环境变量设置和编译器兼容性等关键难点,帮助用户高效部署气象研究与预报模型。

weixin_29213525的博客 382

AI 辅助代码审查:开启代码质量管控的智能时代

AI辅助代码审查正在改变传统的代码质量管控方式。通过自动化分析、智能反馈和上下文感知,AI不仅提高了代码审查的效率,还提升了代码质量的一致性和可维护性。随着机器学习和深度学习技术的不断发展,未来AI将成为开发者日常工作中强大的助手,进一步推动软件开发向智能化、自动化方向发展。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 3229

MySQL集群方案

MySQL集群方案1 方案介绍1.1 概述1.2 软件包1.3 原理1.4 参考资料2 Innodb Cluster搭建2.1 IP规划2.2 基础配置2.2.1 关闭SELinux2.2.2 关闭防火墙或开放需要的业务端口2.2.3 调整max_open_files2.2.4 重启检查SELinux、firewalld和open files2.2.5 配置其它设备2.3 配置主机名解析2.4 检查python版本2.5 卸载系统自带的MySQL2.6 初始化主节点2.6.1 上传、安装软件包2.6.2 创

Zhuge_Dan的博客 6533

使用Google Earth Engine(GEE)的Python API,您可以将经纬度坐标转换为Landsat影像的路径/行号

使用Google Earth Engine(GEE)的Python API,您可以将经纬度坐标转换为Landsat影像的路径/行号。在这个示例中,我们选择了一个位于加利福尼亚州旧金山市附近的点,其经度为-122.084,纬度为37.421998。首先,我们需要导入必要的库和模块。接下来,我们定义一个函数,该函数将接收经度和纬度作为输入,并返回对应的Landsat路径/行号。最后,我们提取路径和行号的值,并将它们作为结果返回。现在,我们可以使用这个函数来获取特定点的Landsat路径/行号。

VwajAlgorithm的博客 351

mysql innodb 测试集群成功_mysql8.0.20安装测试innodb cluster

本文记录搭建mysql innodb cluster的过程和基本的测试。1、环境描述主机名主机IP部署tidb60192.168.68.60MySQL8.0.20tidb61192.168.68.61MySQL8.0.20tidb62192.168.68.62MySQL8.0.20tidb63192.168.68.63MySQL-shell,MySQL-route,mysql-client2、下载...

weixin_28922227的博客 592

Linux Kernel入门到精通系列讲解 - 总目录

在学习Linux Kernel之前,需要先准备开发环境,方便后续进行开发。可以根据自身情况,选择性阅读该章节。学习该章节之前,你应该了解一下网络概念,明白为什么要讲这些,才能更有方向的去理解学习。Linux ARM平台开发系列讲解(设备树篇) 4.1.1 设备树的原理详解。本项目完全开源,仅供学习使用,如需其他用途,请与本人联系。),本章节你可以学习到。摄像头V4L2子系统、Linux kernel常用的子系统等,ARM架构、RISCV架构、Uboot等。

DSMGUOGUO的博客 1万+

汽车UDS诊断详解及Vector相关工具链使用说明——总述

1.什么是诊断 车辆在运行过程中,不可避免地会发生一些故障,为了确保行车安全,我们要求车上的ECU能够实时监测部件的运行状态,一旦发现异常情况,能通过点亮报警灯等方式提示驾驶员。但是,点亮报警灯只能告诉驾驶员车辆发生了故障,最多只能定位到故障ECU,比如ABS报警灯亮说明ABS系统出现故障,但具体是什么部件发生故障并不能通过报警灯显示出来。这时就需要ECU在本地存储一个与故障相对应的故障代码,在进行维修的时候,可以通过车上的OBD接口连接诊断仪,把这个存储的故障代码读取出来,从而进一步定位到更加具体的故障部

weixin_42967006的博客 2万+

MySQL 索引深入理解:B+ 树、二级索引、联合索引与查询优化

理解二级索引后,就可以理解回表了。SELECT *MySQL 的执行过程分为三个步骤。覆盖索引(Covering Index)并不是一种独立的索引类型,而是一种查询效果。SQL 查询需要的所有字段,都能够直接从某个索引中获得,不需要再访问聚簇索引获取其他字段。例如:因为user_id已经包含在二级索引中,所以 MySQL 可以直接返回结果。不需要回表。联合索引(Composite Index)是同时使用多个字段建立的索引。它的排序规则是:首先按照user_id排序。当user_id。

m0_64642997的博客 140

强化学习实战——OpenAI Gym环境配置+实战演示(win10)

遇到问题:无法安装pickle5原因是:python3.8与该包不兼容,必须降python3.7的版本。

LZL2020LZL的博客 4900

一篇文章讲清 MySQL 索引:聚簇索引、联合索引、回表与 EXPLAIN

以订单查询为例,拆解 InnoDB 聚簇索引与二级索引的存储和回表路径,解释联合索引的列序、覆盖与 ICP,再用 EXPLAIN 判断扫描、排序和优化器选择,给出可复现的排查方法。

qq_74421990的博客 290

6.4 实战项目:基于Agent内核构建Code Review智能体

本文介绍了一个基于Agent内核构建的智能Code Review系统实战项目。系统采用多Agent协作架构,包含代码质量分析、安全漏洞识别、性能优化建议等核心功能模块。文章详细展示了系统架构设计,采用协调器Agent管理多个专业Agent协同工作,并提供了基础Agent框架和协调器Agent的TypeScript实现代码。项目结合了AI Agent核心原理和多Agent协作机制,实现了自动化的代码审查流程,能够生成详细的审查报告,帮助开发者提升代码质量和安全性。

yonggeit的博客 3114

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

MySQL 中 DISTINCT 与 GROUP BY 哪个效率更高?

DISTINCT与GROUP BY在纯去重场景下,MySQL 8.0 中执行计划通常一致,效率基本相同。老版本(8.0.13 之前)GROUP BY有隐式排序开销,DISTINCT往往更快。需要聚合或HAVING时,只能用GROUP BY。效率的真正决定因素是索引和执行计划,而不是这两个关键字本身。所以,与其问「哪个更快」,不如问「我的查询有没有走对索引」。

2601_96709915的博客 339

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

4. 关系型数据库-MySQL-Canal 进阶

Canal 是基于 MySQL binlog 的增量数据订阅工具,可实现数据库变更的实时捕获。它通过伪装从库订阅 binlog,无需业务代码侵入,支持缓存同步、搜索索引更新、数据异构、实时入仓及汇总宽表增量更新等场景。使用时需开启 ROW 格式 binlog,配置专用账号,并通过 canal-server 接收事件,下游消费者处理后确认。注意 binlog 保留期、正则过滤写法及全量初始化等关键点,避免数据丢失或误判。

princemilo的博客 149

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

mysql常见问题汇总

按「现象 → 排查 → 解法」整理,按事故频率排序。

qq_38636133的博客 183

基于 FastAPI+LangChain+LangGraph+Agent+Vue3+MySQL 的房产数据采集与房价预测分析平台

本文介绍一个完整的「房产数据采集+AI房价预测」全栈项目,涵盖FastAPI异步后端、LangGraph Agent智能问答、爬虫采集、机器学习预测与Vue3前端,实现从数据采集到AI交互的闭环。项目融合多技术栈,具备真实业务场景与生产级设计(如降级策略、流式输出、多模型对比),兼具简历亮点与答辩演示优势,可系统性提升工程能力,并附高频面试题解析,是理想的技术综合实践项目。

深耕开发,专注编程实战。分享源码解析、项目搭建、问题排查笔记,沉淀技术,持续更新。 248

MySQL 事务:转账中途断电,钱为什么没有丢

本文系统讲解 MySQL 事务的原理与实践:以转账场景引入原子性、一致性、隔离性、持久性四大保证,剖析脏读、不可重复读、幻读三类并发异常与四个隔离级别的取舍,解读 undo log、redo log、锁与多版本并发控制的底层实现,并给出事务粒度控制与异常回滚的编码建议。

大模型全栈工程师 · Thanks_ks 310

MYSQL-多表设计

在项目开发中,在进行各个数据库表结构设计时,会根据业务需求及业务模块之间的关系,分析并设计表结构。由于业务之间相互关联,所有各个表结构之间也存在各种联系。

weixin_61074074的博客 173

微服务架构下的MySQL设计实战

微服务架构下的 MySQL 交付,核心不是追求最先进的技术方案,而是建立一套边界清晰、可评审、可监控、可回滚的规范体系。分库分表解决容量与写入扩展,读写分离解决读扩展,索引优化与慢查询治理解决日常性能问题,变更管控与备份容灾守住交付底线。把这些实践嵌入需求评审、开发自测、测试压测、上线灰度、运维巡检的每个环节,并明确各自的适用边界与常见误区,才能真正让数据库成为微服务交付的稳定底座,而不是随时可能引爆的风险点。

流水账 765

mysql初阶--数据库设计

本文系统阐述数据库设计的核心方法论,从范式理论(1NF、2NF、3NF)出发,揭示数据冗余与操作异常的根源,强调3NF为工程实践的最优平衡点。通过E-R图构建实体关系模型,实现从业务需求到表结构的清晰映射。文章厘清类、实体、表三者对应关系,提出“抽象→建模→落地”的设计流程,帮助开发者建立可复用的数据库设计思维框架,避免“拍脑袋”建表的陷阱。

2601_97033068的博客 715

MySQL报Too many open files?句柄耗尽的排查与参数配置

文章讲清 max_connections 与 open_files_limit 两个额度、句柄被谁占走、分区表为什么最容易踩,给出从 error log 到 /proc/pid/limits 的定位顺序与句柄预算算法。

「一个在数据库赛道上边学边分享的学妹」——聚焦国产数据库/信创方向、分享学习笔记、踩坑经验和行业观察。 337

MySQL --库的操作

基于 Unicode 9.0 规则,排序更准确,性能也更好。新库如果没有特殊兼容需求,直接让默认值生效即可,不必手动指定。后面的数字表示版本号,意思是“如果当前 MySQL 版本 ≥ 4.01.00,就执行这句话”。在老版本中比较粗糙,比如它认为某些带重音的字母和普通字母等价。连接数爆满报“Too many connections”时,找出谁占着连接不放。,所以导出文件里不含建库语句。,但 MySQL 不强制大小写,建议养成大写习惯。,更不会转换表里已经存好的数据。),必须用反引号包起来,否则语法报错。

2501_94405739的博客 291

Flink 连接器选型实战:HDFS、Kafka、MySQL 与 Doris 的分层数据架构

连接器选型不是技术炫技,而是对数据特征的准确判断。HDFS承担离线归档与批处理,靠分区和滚动策略控制文件质量。Kafka是实时链路的中枢,靠分区、攒批和事务保证吞吐与一致性。MySQL只做维表和小结果集,靠缓存和限流保护在线库。Doris承接大数据量分析写入,靠分桶、攒批和两阶段提交保证性能与准确。把这四者按数据规模、延迟要求和一致性要求分层组合,就能搭出一套既稳定又可扩展的 Flink 数据架构。

2401_83857914的博客 877
上一篇: 因为mysql 8新的认证插件导致主从复制的IO线程失败
下一篇: 揭秘导致MongoDB服务启动失败的幕后黑手
Awesome Database
博客等级 码龄14年 128粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值