数据库主从备份

1、简介

数据库运⾏时,⼀些因素可能会导致服务运⾏不正常,⽤户访问数据受阻。对于互联⽹公 司,尤其是购物⽹站⽽⾔,这种情况造成的损失是⽆法估量的。因此,对数据库进⾏“备份” 也是必不可少的操作。当主要的数据库死机时,系统能够快速地切换到备⽤的数据库上。本 章将详细介绍数据库集群中的主从复制原理和操作流程。

2、主从复制集群的⼯作流程如下

(1)主服务器上⾯的任何修改都会通过⾃⼰的I/O线程保存在⼆进制⽇志⾥。

(2)从服务器上⾯也会启动⼀个I/O线程,通过配置好的⽤户名和密码连接到主服务器上⾯ 请求读取⼆进制⽇志,然后把读取到的⼆进制⽇志写到本地的⼀个中继⽇志的末端,并将读 取到的主服务器端的⼆进制⽇志的⽂件名和位置记录到master-info⽂件中,以便在下⼀次读 取的时候能够清楚地告诉主服务器:我需要某个⼆进制⽇志的某个位置之后的⽇志内容,请 发给我。

(3)从服务器的SQL线程检测到中继⽇志中新增加了内容后,会⻢上解析⽇志中的内容,并 在⾃身执⾏。需要注意,每个从服务器都会收到主服务器⼆进制⽇志中的全部内容的副本, 除⾮另⾏指定,否则,从服务器将执⾏来⾃主服务器⼆进制⽇志⽂件的所有的操作语句。另 外,从服务器每次进⾏同步时,都会记录⼆进制⽇志坐标(坐标包含⽂件名和从主服务器上 读取的位置,即master-info),以便下次连接使⽤。由于每个从服务器分别记录了当前⼆进制 ⽇志的位置,因此可以断开从服务器的连接,重新连接,然后恢复处理。

(4)在从服务器上删除的数据,在主服务器上重新创建,从服务器并不会同步过来,所以不要轻易的在从服务器上做删除操作。

3、基本架构

在 MySQL 的主从复制集群中,主数据库既要负责写操作⼜要负责为从数据库提供⼆进制⽇ 志,这⽆疑增加了主数据库的压⼒。此时可以将⼆进制⽇志只给某⼀个从服务器使⽤,并在 该从服务器上开启⼆进制⽇志,将该从服务器⼆进制⽇志分发给其他的从服务器;或者,这 个从服务器不进⾏数据的复制,只负责将⼆进制⽇志转发给其他的从服务器。这样,不仅可 以减少主服务的压⼒,还可以提⾼整体架构的性能。

⼀主多从原理如图所示

4、 多源复制架构

MySQL 5.7开始⽀持多源复制架构,即多个主服务器连接同⼀个从服务器(多主⼀从)。

多源复制中加⼊了⼀个叫作Channel的概念,每⼀个Channel都是⼀个独⽴的Slave,都有 ⼀个IO线程和⼀个SQL线程, 基本原理和普通的复制⼀样。 在对 Slave执⾏ CHANGEMASTER 语句时,只需要在每个语句最后使⽤for channel 关键字来进⾏区分即 可。

需要注意,在使⽤这种架构时,需要在从数据库的my.cnf配置⽂件中将master-inforepository、relay-log-info-repository参数设置为TABLE, 否则系统会报错。 相⽐于传统的⼀主⼀从、多主多从,在多源复制架构中,管理者可以直接在从数据库中进⾏ 数据备份, 不会影响线上业务的正常运⾏。

多源复制架构将多台数据库连接在⼀起,可以实 现合并表碎⽚,管理者不需要为每个数据库都制作⼀个实例,减少了维护成本,使⽤这种⽅ 式在后期进⾏数据统计时也会⾮常⾼效。

5、多主多从复制

在⼀主的情况下,主节点发⽣故障会影响全局的写⼊,设置双主或者多主集群可以避免单点 故障的发⽣。

前⾯介绍过的⼀主⼀从架构为基础,只需要集群中再加⼊⼀个主服务器master2和⼀个从 服务器slave2即可实现双主双从和多源复制架构。

6、复制模式

MySQL主从复制的⽅式可以分为异步复制、同步复制和半同步复制。

1.异步复制

异步复制为MySQL默认的复制⽅式, 主数据库执⾏完客户端提交的事务后会⽴即将结果返 给客户端,并不关⼼从数据库是否已经接收并进⾏了处理。 从⽇志的⻆度讲,在主数据库将 事务写⼊⼆进制⽇志⽂件后,主数据库只会通知dump线程发送这些新的⼆进制⽇志⽂件, 然后主数据库就会继续处理提交操作,并不考虑这些⼆进制⽇志已经传到每个从数据库节点 上。在使⽤异步复制模式时,如果主数据库崩溃,可能会出现主数据库上已经提交的事务并 没有传到从数据库上的情况,如果此时将从数据库提升为主数据库,很有可能导致新主数据 库上的数据不完整。

2.同步复制

同步复制是指主数据库向从数据库发送⼀个事务,并且所有的从数据库都执⾏了该事务后才会 将结果提交给客户端。因为需要等待所有的从数据库执⾏完该事务,所以在使⽤同步复制 时,主数据库完成⼀个事务的时间会被拉⻓,系统性能受到严重影响。

3.半同步复制

半同步复制介于同步复制与异步复制之间,主数据库只需要等待⾄少⼀个从数据库节点收到 并且更新⼆进制⽇志到中继⽇志⽂件即可,不需要等待所有从数据库给主数据库反馈。如此 ⼀来,不仅节省了很多时间,⽽且提⾼了数据的安全性。另外, 由于整个过程产⽣通信,所 以建议在低延时的⽹络中使⽤半同步复制。

环境

系统 :Redhat 9

mariadb版本:10.5.16

主机一:master 192.168.200.133

主机二:salve 192.168.200.128

步骤

先给两台设备进⾏命名为master和savle

[root@admin ~]#  hostnamectl set-hostname master
[root@admin ~]# bash
[root@master ~]# 


[root@localhost ~]#  hostnamectl set-hostname salve
[root@localhost ~]# bash
[root@salve ~]# 

对两台设备进⾏关闭防⽕墙和selinux操作

[root@master ~]# systemctl  stop firewalld.service 
[root@master ~]# systemctl  disable firewalld.service 
Removed "/etc/systemd/system/multi-user.target.wants/firewalld.service".
Removed "/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service".
[root@master ~]# setenforce  0


[root@salve ~]# systemctl  stop firewalld.service 
[root@salve ~]# systemctl  disable firewalld.service 
Removed "/etc/systemd/system/multi-user.target.wants/firewalld.service".
Removed "/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service".
[root@salve ~]# setenforce  0

 配置本地yum仓库、并安装yum工具 配置阿里云网络源

#master
[root@master ~]# mount  /dev/sr0  /media/
mount: /media: WARNING: source write-protected, mounted read-only.
[root@master ~]# cat /etc/yum.repos.d/local.repo 
[AppStream]
name=AppStream
baseurl=file:///media/AppStream
enabled=1
gpgcheck=0
[BaseOS]
name=BaseOS
baseurl=file:///media/BaseOS
enabled=1
gpgcheck=0
[root@master ~]# 
[root@master ~]# yum -y install  yum-utils.noarch
[root@master ~]# yum-config-manager  --add-repo https://mirrors.aliyun.com/redhat/rhel/rhel-9-beta/rhel-9-beta.repo
正在更新 Subscription Management 软件仓库。
无法读取客户身份

本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。

添加仓库自:https://mirrors.aliyun.com/redhat/rhel/rhel-9-beta/rhel-9-beta.repo
[root@master ~]# 


#salve
[root@savle mnt]# mount /dev/sr1 /mnt/
[root@savle mnt]# cat /etc/yum.repos.d/local.repo 
[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
enabled=1
gpgcheck=0
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
enabled=1
gpgcheck=0
[root@savle mnt]# 
[root@savle ~]# yum -y install  yum-utils.noarch
[root@savle ~]# yum-config-manager  --add-repo https://mirrors.aliyun.com/redhat/rhel/rhel-9-beta/rhel-9-beta.repo
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Adding repo from: https://mirrors.aliyun.com/redhat/rhel/rhel-9-beta/rhel-9-beta.repo
[root@savle ~]# 

修改源的enabled项为1 、以及地址项

#master
[root@master ~]# sed -i -e   's/enabled = 0/enabled = 1/g'  /etc/yum.repos.d/rhel-9-beta.repo 
[root@master ~]#  sed -i -e   's/downloads.redhat.com/mirrors.aliyun.com/g'  /etc/yum.repos.d/rhel-9-beta.repo
[root@master ~]# 

#savle
[root@savle ~]# sed -i -e   's/enabled = 0/enabled = 1/g'  /etc/yum.repos.d/rhel-9-beta.repo 
[root@savle ~]# sed -i -e   's/downloads.redhat.com/mirrors.aliyun.com/g'  /etc/yum.repos.d/rhel-9-beta.repo 
[root@savle ~]# 

在两台设备上 安装mariadb服务

#master
[root@master ~]# yum -y install  mariadb mariadb-server
正在更新 Subscription Management 软件仓库。
无法读取客户身份

本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。

上次元数据过期检查:0:02:11 前,执行于 2024年04月16日 星期二 13时27分59秒。
依赖关系解决。
=======================================================================================================================================================
 软件包                                         架构                       版本                                    仓库                           大小
=======================================================================================================================================================
安装:
 mariadb                                        x86_64                     3:10.5.16-2.el9_0                       AppStream                     1.6 M
 mariadb-server                                 x86_64
 省略 。。。。。
 
 
 #savle
 [root@savle ~]# yum -y install  mariadb mariadb-server
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:02:37 ago on Tue 16 Apr 2024 01:28:12 PM CST.
Dependencies resolved.
=======================================================================================================================================================
 Package                                        Architecture               Version                                 Repository                     Size
=======================================================================================================================================================
Installing:
 mariadb                                        x86_64                     3:10.5.16-2.el9_0                       AppStream                     1.6 M
 mariadb-server                                 x86_64                     3:10.5.16-2.el9_0                       AppStream                     9.4 M
省略 。。。。。

对两台设备进⾏启动mariadb服务操作并设置为开机⾃启动,随后进⾏数据库 安全设置

#master
[root@master ~]# systemctl  restart  mariadb.service 
[root@master ~]# systemctl  enable  mariadb.service 
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
[root@master ~]# 
[root@master ~]# mysql_secure_installation 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n] y   //切换到unix_socket身份验证
Enabled successfully!
Reloading privilege tables..
 ... Success!


You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n] y //设置密码
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]  //移除匿名用户
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]  //禁止root远程登录
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]   //移除test数据库
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]   //刷新权限表
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!


#savle
[root@savle ~]# systemctl  restart  mariadb.service 
[root@savle ~]# systemctl enable  mariadb.service 
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
[root@savle ~]# mysql_secure_installation 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n] y
Enabled successfully!
Reloading privilege tables..
 ... Success!


You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] 
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] 
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] 
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] 
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
[root@savle ~]# 

对两台设备进⾏主从同步设置 并重启服务

#master
[root@master ~]# vim /etc/my.cnf.d/mariadb-server.cnf 
 16 [mysqld]
 17 datadir=/var/lib/mysql   //存储数据库文件的目录。这通常包括所有的数据库文件、表文件、索引文件等。
 18 socket=/var/lib/mysql/mysql.sock //定义了UNIX套接字文件的路径
 19 log-error=/var/log/mariadb/mariadb.log   //指定了MariaDB的错误日志文件的路径
 20 pid-file=/run/mariadb/mariadb.pid   //置了进程ID(PID)文件的路径
 21 log_bin=mysql_bin                //指定二进制日志功能日志文件名为mysql_bin
 22 binlog_ignore_db=mysql          //这行配置指定了在二进制日志中忽略的数据库
 23 server_id=200                    //优先级,越小越优先
[root@master ~]# systemctl  restart  mariadb.service 
[root@master ~]#

 #savle
 [root@savle ~]# vim /etc/my.cnf.d/mariadb-server.cnf 
 16 [mysqld]
 17 datadir=/var/lib/mysql   //存储数据库文件的目录。这通常包括所有的数据库文件、表文件、索引文件等。
 18 socket=/var/lib/mysql/mysql.sock //定义了UNIX套接字文件的路径
 19 log-error=/var/log/mariadb/mariadb.log   //指定了MariaDB的错误日志文件的路径
 20 pid-file=/run/mariadb/mariadb.pid   //置了进程ID(PID)文件的路径
 21 log_bin=mysql_bin                //指定二进制日志功能日志文件名为mysql_bin
 22 binlog_ignore_db=mysql          //这行配置指定了在二进制日志中忽略的数据库
 23 server_id=201                    //优先级,越小越优先
 [root@savle ~]# systemctl  restart  mariadb.service 
 [root@savle ~]# 

在master上对savle⽤户进⾏授权操作,使其能够访问数据库

[root@master ~]# mysql -uroot
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 10.5.16-MariaDB-log MariaDB Server   

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create user 'savle'@'%' identified by '123456';
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> GRANT REPLICATION SLAVE ON *.* TO 'savle'@'%' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.001 sec)

MariaDB [(none)]> 
MariaDB [(none)]> create database  test;    //创建数据库用于测试从服务器同步
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.000 sec)

MariaDB [(none)]> 

 在savle上开启同步设置

MariaDB [(none)]> change master to master_host='192.168.200.133',master_user='savle',master_password='123456';
Query OK, 0 rows affected (0.011 sec)
MariaDB [(none)]> start slave;
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> show slave status \G;        // \G参数使得输出结果以垂直格式显示
*************************** 1. row ***************************
                Slave_IO_State: Waiting for master to send event
                   Master_Host: 192.168.200.133
                   Master_User: savle
                   Master_Port: 3306
                 Connect_Retry: 60
               Master_Log_File: mysql_bin.000001
           Read_Master_Log_Pos: 798
                Relay_Log_File: mariadb-relay-bin.000002
                 Relay_Log_Pos: 1097
         Relay_Master_Log_File: mysql_bin.000001
              Slave_IO_Running: Yes      //此项为yes即可
             Slave_SQL_Running: Yes      //此项为yes即可
               Replicate_Do_DB: 
           Replicate_Ignore_DB: 
            Replicate_Do_Table: 
        Replicate_Ignore_Table: 
       Replicate_Wild_Do_Table: 
   Replicate_Wild_Ignore_Table: 
                    Last_Errno: 0
                    Last_Error: 
                  Skip_Counter: 0
           Exec_Master_Log_Pos: 798
               Relay_Log_Space: 1408
               Until_Condition: None
                Until_Log_File: 
                 Until_Log_Pos: 0
            Master_SSL_Allowed: No
            Master_SSL_CA_File: 
            Master_SSL_CA_Path: 
               Master_SSL_Cert: 
             Master_SSL_Cipher: 
                Master_SSL_Key: 
         Seconds_Behind_Master: 0
 Master_SSL_Verify_Server_Cert: No
                 Last_IO_Errno: 0
                 Last_IO_Error: 
                Last_SQL_Errno: 0
                Last_SQL_Error: 
   Replicate_Ignore_Server_Ids: 
              Master_Server_Id: 200
                Master_SSL_Crl: 
            Master_SSL_Crlpath: 
                    Using_Gtid: No
                   Gtid_IO_Pos: 
       Replicate_Do_Domain_Ids: 
   Replicate_Ignore_Domain_Ids: 
                 Parallel_Mode: optimistic
                     SQL_Delay: 0
           SQL_Remaining_Delay: NULL
       Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
              Slave_DDL_Groups: 3
Slave_Non_Transactional_Groups: 0
    Slave_Transactional_Groups: 0
1 row in set (0.000 sec)

ERROR: No query specified

MariaDB [(none)]> 
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |   //刚刚主服务器创建的test数据库
+--------------------+
4 rows in set (0.001 sec)

MariaDB [(none)]> 

#回到主服务器再次进行测试

[root@master ~]# mysql -uroot -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.5.16-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create  database abc;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> 

#进入savle
[root@savle ~]# mysql -uroot -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 10.5.16-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| abc                |   //发现已经同步过来了
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
5 rows in set (0.000 sec)

MariaDB [(none)]> 

mysql的主从备份就到此结束啦!!!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/553433.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

HX711压力传感器学习一(STM32)

目录 原理图:​ 引脚介绍: HX711介绍工作原理: 程序讲解: 整套工程: 发送的代码工程,与博客的不一致,如果编译有报错请按照报错和博客进行修改 原理图: 引脚介绍: VCC和GND引…

数字孪生模型降价技术

前言: 数字经济是继农业经济、工业经济之后,随着信息技术革命发展而产生的一种新的经济形态,大力发展数字经济已经成为国家实施大数据战略、主推经济高质量发展的重要抓手,而数字孪生则是助力数字经济与实体经济融合发展的一种重…

局域网MongoDB的数据库访问不了

局域网MongoDB的数据库访问不了 确认bindIp: 0.0.0.0后,仍然是访问不了,查询资料发现是windows自带防火墙的问题 进入到 允许其他应用,选择mongod.exe的位置 这样就好了。

CSS 01

CSS层叠样式表 HTML的局限性 HTML只关注内容的语义,可以做简单的样式,却带来了无限的臃肿和繁琐。 CSS CSS是层叠样式表的简称,也被称之为CSS样式表或级联样式表。CSS也是一种标记语言。   CSS主要用于设置HTML页面中的文本内容(字体、大…

基于SpringBoot框架的“智慧食堂”

采用技术 基于SpringBoot框架的“智慧食堂”系统的设计与实现~ 开发语言:Java 数据库:MySQL 技术:SpringBootMyBatis 工具:IDEA/Ecilpse、Navicat、Maven 页面展示效果 系统功能 系统首页 用户注册页面 菜品信息页面 个人…

【R语言】混合图:小提琴图+箱线图

{ggstatsplot} 是 {ggplot2} 包的扩展,用于创建图形,其中包含信息丰富的绘图本身中包含的统计测试的详细信息。在典型的探索性数据分析工作流程中,数据可视化和统计建模是两个不同的阶段:可视化通知建模,而建模又可以建…

嵌入式学习56-ARM5(linux驱动启动程序)

知识零碎: bootm: 启动内核同时给内核传参 …

电能质量检测仪

TH-6500随着电力系统的快速发展和智能化水平的提高,电能质量问题越来越受到人们的关注。电能质量检测仪作为一种关键设备,能够实时监测电能质量,为电力系统的稳定运行提供有力保障。 一、电能质量检测仪概述 电能质量检测仪是一种用于监测和…

怎样将excel的科学计数法设置为指数形式?

对了,这个问题中所谓的“指数形式”是指数学上书写的右上标的指数格式,能不能通过单元格设置来做这个格式的转换呢? 一、几个尝试 以下,以数字123000为例来说明。 情况1.转换成数学上的书写方式,如下图的样子&#x…

象棋教学辅助软件介绍

背景 各大象棋软件厂商都有丰富的题目提供训练,但是其AI辅助要么太弱,要么要付费解锁,非常不适合我们这些没有赞助的业余棋手自行训练,于是我需要对其进行视觉识别,和AI训练,通过开启这个辅助软件&#xf…

Linux安装和使用Android Debug Bridge(ADB)

目录 1、开发环境和工具 2、ADB是什么? 3、安装ADB 3.1、使用包管理器安装 ADB 3.2、手动安装 ADB 4、使用ADB 4.1、连接设备 4.2、执行shell命令 4.3、安装应用程序 4.4、截取屏幕截图 4.5、模拟按键和手势 4.6、上传文件到Android设备 4.7、从Android设备下载文件…

Chrome修改主题颜色

注意:自定义Chrome按钮只在搜索引擎为Google的时候出现。

2024年五一杯数学建模C题思路分析

文章目录 1 赛题思路2 比赛日期和时间3 组织机构4 建模常见问题类型4.1 分类问题4.2 优化问题4.3 预测问题4.4 评价问题 5 建模资料 1 赛题思路 (赛题出来以后第一时间在CSDN分享) https://blog.csdn.net/dc_sinor?typeblog 2 比赛日期和时间 报名截止时间:2024…

Civil3D 2024安装包(亲测可用)

目录 一、软件简介 二、软件下载 一、软件简介 Civil3D软件是一款专为土木工程设计与文档编制而打造的建筑信息模型(BIM)解决方案。它结合了AutoCAD的熟悉环境,并进行了专业定制,以满足土木工程道路与土石方解决的需求。Civil3D能…

HTML5漫画风格个人介绍源码

源码介绍 HTML5漫画风格个人介绍源码,源码由HTMLCSSJS组成,记事本打开源码文件可以进行内容文字之类的修改,双击html文件可以本地运行效果,也可以上传到服务器里面,重定向这个界面 效果截图 源码下载 HTML5漫画风格…

Java设计模式——代理模式

静态代理: Java静态代理是设计模式中的一种,它通过创建一个代理类来代替原始类,从而提供额外的功能或控制原始类的访问。 如何使用Java静态代理 要创建一个静态代理,你需要有一个接口,一个实现该接口的目标类&#…

固定测斜仪:工程观测的精密利器

在工程观测测量领域,固定测斜仪扮演着至关重要的角色。固定测斜仪,凭借其耐冲击型倾斜传感器、出色的可靠性、快速稳定的特点,以及简洁的安装和智能识别功能,已成为行业内重要工具。其输出信号为RS485数字量,可直接显示…

【C++进阶】C++中的继承

一、概述 作为C的三大特性之一封装,继承,多态 中的继承,我们在进阶部分一定要详细说明。请跟着如下的小标题进入深度学习。 二、正文 1.继承的概念及定义 首先,我们先要知道什么是继承, 继承 (inheritance)机制是面…

面试八股——集合——List

主要问题 数组 如果数组索引从0开始时,数组的寻址方式为: 如果数组索引从1开始时,数组的寻址方式为: 此时对于CPU来说增加了一个减法指令,降低寻址效率。 ArrayList⭐ ArrayList构造函数 尤其说一下第三个构造函数流…

手撸词法分析器(C/C++)

手撸词法分析器(C/C) 一.背景二.什么是词法分析器?三.代码四.思考 一.背景 这学期开设了编译原理,要求写个基本的词法分析器。所以博主就自己写了一份代码,也比较简单基础。 二.什么是词法分析器? 简单来…
最新文章