Oracle Linux8 安装 MySQL 8.4.3,搭建一主一从

文章目录

  • 安装依赖
  • 获取安装包
  • 解压
  • 准备相关目录
  • 设置配置文件
  • 启动数据库
  • 连接数据库
  • socket 文件优化
  • 同样方法准备 3307 数据库实例
  • 设置配置文件
  • 启动 3307 实例数据库
  • 连接并查看 3307 数据库实例
  • 基于 bin log 搭建主从模式

安装依赖

yum install -y numactl libaio ncurses-compat-libs

获取安装包

[root@oracleLinux8 mysql]# ll /root/mysql-8.4.3-linux-glibc2.17-aarch64.tar.xz
-rw-r--r-- 1 root root 896423176 Apr 20 21:40 /root/mysql-8.4.3-linux-glibc2.17-aarch64.tar.xz

解压

cd /root
tar xf mysql*xz -C /usr/local/
ln -s /usr/local/mysql-8.4.3-linux-glibc2.17-aarch64 /usr/local/mysql

准备相关目录

cd /usr/local/mysql
mkdir -p 3306/{data,socket,error_log,slow_error_log,pid_log,file}
/usr/local/mysql/bin/mysqld --initialize --user=mysql  --datadir=/usr/local/mysql/3306/data2025-04-20T14:08:36.281629Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2025-04-20T14:08:36.283506Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.4.3) initializing of server in progress as process 2983
2025-04-20T14:08:36.296320Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
get_mempolicy: Function not implemented
2025-04-20T14:08:36.299476Z 1 [Warning] [MY-011873] [InnoDB] Failed to set NUMA memory policy to MPOL_INTERLEAVE: Function not implemented
get_mempolicy: Function not implemented
2025-04-20T14:08:36.299650Z 0 [Warning] [MY-011879] [InnoDB] Failed to set NUMA memory policy of buffer pool page frames with mbind(0xffff77d10000,137297920,MPOL_INTERLEAVE,...,...,MPOL_MF_MOVE) failed with Function not implemented
2025-04-20T14:08:36.303475Z 1 [Warning] [MY-011875] [InnoDB] Failed to set NUMA memory policy to MPOL_DEFAULT: Function not implemented
2025-04-20T14:08:36.564595Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2025-04-20T14:08:37.648592Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: !s:Cll=ey4Wz
2025-04-20T14:08:39.366449Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.

设置配置文件

cat > /usr/local/mysql/3306/data/my.cnf <<"EOF"
[mysqld]
# Basic Settings
user = mysql
basedir = /usr/local/mysql
datadir = /usr/local/mysql/3306/data
socket = /usr/local/mysql/3306/socket/mysql.sock
pid-file = /usr/local/mysql/3306/pid_log/mysql.pid
secure_file_priv = /usr/local/mysql/3306/file
log-bin=mysql-bin
server_id=1
mysql_native_password=ON
innodb_flush_log_at_trx_commit=1
sync_binlog=1# Network
port = 3306
bind-address = 0.0.0.0# Logging
log_error = /usr/local/mysql/3306/error_log/mysql-error.log
slow_query_log = 1
slow_query_log_file = /usr/local/mysql/3306/slow_error_log/mysql-slow.log
long_query_time = 2# InnoDB Settings
innodb_buffer_pool_size = 128M
innodb_log_file_size = 64M
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 1# Security
skip-name-resolve
local-infile = 0# Performance
max_connections = 100
thread_cache_size = 8
table_open_cache = 1000[client]
socket = /usr/local/mysql/3306/socket/mysql.sock
port = 3306[mysql]
socket = /usr/local/mysql/3306/socket/mysql.sock
auto-rehash
EOF

启动数据库

touch /usr/local/mysql/3306/error_log/mysql-error.log
mkdir -p /usr/local/mysql/file
chown mysql:mysql -R /usr/local/mysql/
chown mysql:mysql -R /usr/local/mysql/3306/*/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/3306/data/my.cnf &[root@oracleLinux8 mysql]#  /usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/3306/data/my.cnf &
[1] 5743
[root@oracleLinux8 mysql]# 2025-04-20T14:21:31.458910Z mysqld_safe Logging to '/usr/local/mysql/3306/error_log/mysql-error.log'.
2025-04-20T14:21:31.468890Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/3306/data[root@oracleLinux8 mysql]#
[root@oracleLinux8 mysql]# ps -ef |grep mysql
root        5743    2266  0 22:21 pts/1    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/3306/data/my.cnf
mysql       6093    5743 11 22:21 pts/1    00:00:00 /usr/local/mysql/bin/mysqld --defaults-file=/usr/local/mysql/3306/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/3306/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/3306/error_log/mysql-error.log --pid-file=/usr/local/mysql/3306/pid_log/mysql.pid --socket=/usr/local/mysql/3306/socket/mysql.sock --port=3306
root        6138    2266  0 22:21 pts/1    00:00:00 grep --color=auto mysql
[root@oracleLinux8 mysql]#
[root@oracleLinux8 mysql]#
[root@oracleLinux8 mysql]# ss -tunlp | grep mysql
tcp   LISTEN 0      100          0.0.0.0:3306       0.0.0.0:*    users:(("mysqld",pid=6093,fd=22))
tcp   LISTEN 0      70                 *:33060            *:*    users:(("mysqld",pid=6093,fd=18))

连接数据库

/usr/local/mysql/bin/mysql -u root -p  -S /usr/local/mysql/3306/socket/mysql.sock
密码在前面日志中有 !s:Cll=ey4Wzmysql> alter user user() identified by 'root';
Query OK, 0 rows affected (0.02 sec)mysql> select user,host from mysql.user;
+------------------+-----------+
| user             | host      |
+------------------+-----------+
| mysql.infoschema | localhost |
| mysql.session    | localhost |
| mysql.sys        | localhost |
| root             | localhost |
+------------------+-----------+
4 rows in set (0.00 sec)

socket 文件优化

每次登录, 输入 socket 文件过长,比较麻烦

cat >> ~/.bash_profile <<"EOF"
export MYSQL_UNIX_PORT=/usr/local/mysql/3306/socket/mysql.sock
export PATH=/usr/local/mysql/bin:$PATH
EOF
. ~/.bash_profile再次登录
[root@oracleLinux8 mysql]# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.4.3 MySQL Community Server - GPLCopyright (c) 2000, 2024, 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 '\h' for help. Type '\c' to clear the current input statement.mysql>查看状态
[root@oracleLinux8 mysql]# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.4.3 MySQL Community Server - GPLCopyright (c) 2000, 2024, 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 '\h' for help. Type '\c' to clear the current input statement.mysql>  select user();
+----------------+
| user()         |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.02 sec)mysql> select version();
+-----------+
| version() |
+-----------+
| 8.4.3     |
+-----------+
1 row in set (0.00 sec)mysql> status;
--------------
mysql  Ver 8.4.3 for Linux on aarch64 (MySQL Community Server - GPL)Connection id:		13
Current database:
Current user:		root@localhost
SSL:			Not in use
Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server version:		8.4.3 MySQL Community Server - GPL
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	utf8mb4
Db     characterset:	utf8mb4
Client characterset:	utf8mb4
Conn.  characterset:	utf8mb4
UNIX socket:		/usr/local/mysql/3306/socket/mysql.sock
Binary data as:		Hexadecimal
Uptime:			7 min 35 secThreads: 2  Questions: 21  Slow queries: 0  Opens: 130  Flush tables: 3  Open tables: 46  Queries per second avg: 0.046
--------------

同样方法准备 3307 数据库实例

mkdir -p 3307/{data,error_log,slow_error_log,socket,pid_log,file}
chown -R  mysql:mysql 3307[root@oracleLinux8 3307]# /usr/local/mysql/bin/mysqld --initialize --user=mysql  --datadir=/usr/local/mysql/3307/data
2025-04-20T14:52:26.584588Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2025-04-20T14:52:26.586051Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.4.3) initializing of server in progress as process 7278
2025-04-20T14:52:26.611537Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
get_mempolicy: Function not implemented
2025-04-20T14:52:26.615731Z 1 [Warning] [MY-011873] [InnoDB] Failed to set NUMA memory policy to MPOL_INTERLEAVE: Function not implemented
get_mempolicy: Function not implemented
2025-04-20T14:52:26.616091Z 0 [Warning] [MY-011879] [InnoDB] Failed to set NUMA memory policy of buffer pool page frames with mbind(0xffff67d10000,137297920,MPOL_INTERLEAVE,...,...,MPOL_MF_MOVE) failed with Function not implemented
2025-04-20T14:52:26.622379Z 1 [Warning] [MY-011875] [InnoDB] Failed to set NUMA memory policy to MPOL_DEFAULT: Function not implemented
2025-04-20T14:52:26.808322Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2025-04-20T14:52:28.185961Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: BwtrQvcy-0_q
2025-04-20T14:52:29.564978Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.

设置配置文件

cat > /usr/local/mysql/3307/data/my.cnf <<"EOF"
[mysqld]
# Basic Settings
user = mysql
basedir = /usr/local/mysql
datadir = /usr/local/mysql/3307/data
socket = /usr/local/mysql/3307/socket/mysql.sock
pid-file = /usr/local/mysql/3307/pid_log/mysql.pid
secure_file_priv = /usr/local/mysql/3307/file
log-bin=mysql-bin
server_id=2
mysql_native_password=ON
innodb_flush_log_at_trx_commit=1
sync_binlog=1# Network
port = 3307
bind-address = 0.0.0.0# 调整X插件配置(避免端口和socket冲突)
mysqlx_port = 33070
mysqlx_socket = /tmp/mysqlx3307.sock# Logging
log_error = /usr/local/mysql/3307/error_log/mysql-error.log
slow_query_log = 1
slow_query_log_file = /usr/local/mysql/3307/slow_error_log/mysql-slow.log
long_query_time = 2# InnoDB Settings
innodb_buffer_pool_size = 128M
innodb_log_file_size = 64M
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 1# Security
skip-name-resolve
local-infile = 0# Performance
max_connections = 100
thread_cache_size = 8
table_open_cache = 1000[client]
socket = /usr/local/mysql/3307/socket/mysql.sock
port = 3307[mysql]
socket = /usr/local/mysql/3307/socket/mysql.sock
auto-rehash
EOF

主要修改 server_id 与如下两个配置
mysqlx_port = 33070
mysqlx_socket = /tmp/mysqlx3307.sock

启动 3307 实例数据库

[root@oracleLinux8 3307]# /usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/3307/data/my.cnf &
2025-04-20T14:56:00.541265Z mysqld_safe Logging to '/usr/local/mysql/3307/error_log/mysql-error.log'.
2025-04-20T14:56:00.551499Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/3307/data[root@oracleLinux8 3307]# ss -tunlp |grep mysql
tcp   LISTEN 0      100          0.0.0.0:3306       0.0.0.0:*    users:(("mysqld",pid=6093,fd=22))
tcp   LISTEN 0      100          0.0.0.0:3307       0.0.0.0:*    users:(("mysqld",pid=7700,fd=22))
tcp   LISTEN 0      70                 *:33060            *:*    users:(("mysqld",pid=6093,fd=18))
tcp   LISTEN 0      70                 *:33070            *:*    users:(("mysqld",pid=7700,fd=18))

连接并查看 3307 数据库实例

密码在之前初始化的打印中

[root@oracleLinux8 3307]# mysql -p -S /usr/local/mysql/3307/socket/mysql.sock
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.4.3Copyright (c) 2000, 2024, 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 '\h' for help. Type '\c' to clear the current input statement.mysql> select version();
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> alter user user() identified by 'root';
Query OK, 0 rows affected (0.05 sec)mysql> select version();
+-----------+
| version() |
+-----------+
| 8.4.3     |
+-----------+
1 row in set (0.00 sec)mysql> select user();
+----------------+
| user()         |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)mysql> select user,host from mysql.user;
+------------------+-----------+
| user             | host      |
+------------------+-----------+
| mysql.infoschema | localhost |
| mysql.session    | localhost |
| mysql.sys        | localhost |
| root             | localhost |
+------------------+-----------+
4 rows in set (0.00 sec)mysql> status;
--------------
mysql  Ver 8.4.3 for Linux on aarch64 (MySQL Community Server - GPL)Connection id:		11
Current database:
Current user:		root@localhost
SSL:			Not in use
Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server version:		8.4.3
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	utf8mb4
Db     characterset:	utf8mb4
Client characterset:	utf8mb4
Conn.  characterset:	utf8mb4
UNIX socket:		/usr/local/mysql/3307/socket/mysql.sock
Binary data as:		Hexadecimal
Uptime:			4 min 20 secThreads: 2  Questions: 11  Slow queries: 0  Opens: 130  Flush tables: 3  Open tables: 46  Queries per second avg: 0.042
--------------

基于 bin log 搭建主从模式

规划: 3306 是主库; 3307 实例是从库

  • 主库
create USER 'repuser'@'%' IDENTIFIED WITH mysql_native_password BY 'repuser' ;
GRANT REPLICATION SLAVE ON *.* TO 'repuser'@'%';
FLUSH PRIVILEGES;SHOW BINARY LOG STATUS
+------------------+----------+--------------+------------------+-------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000008 |      443 |              |                  |                   |
+------------------+----------+--------------+------------------+-------------------+
  • 从库
stop replica;
change replication source to source_host='127.0.0.1', source_port=3306, source_user='repuser', source_password='repuser', source_log_file='mysql-bin.000008', source_log_pos=443;
show replica status\G第一次报错如下:Last_IO_Errno: 2061Last_IO_Error: Error connecting to source 'repuser@127.0.0.1:3306'. This was attempt 6/10, with a delay of 60 seconds between attempts. Message: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.然后在主库与从库配置文件的 mysqld 中 , 都启用了 mysql_native_password=on, 然后重启了数据库服务
然后同步状态正常如下;
mysql> show replica status\G
*************************** 1. row ***************************Replica_IO_State: Waiting for source to send eventSource_Host: 127.0.0.1Source_User: repuserSource_Port: 3306Connect_Retry: 60Source_Log_File: mysql-bin.000009Read_Source_Log_Pos: 158Relay_Log_File: oracleLinux8-relay-bin.000002Relay_Log_Pos: 328Relay_Source_Log_File: mysql-bin.000009Replica_IO_Running: YesReplica_SQL_Running: YesReplicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table:Last_Errno: 0Last_Error:Skip_Counter: 0Exec_Source_Log_Pos: 158Relay_Log_Space: 546Until_Condition: NoneUntil_Log_File:Until_Log_Pos: 0Source_SSL_Allowed: NoSource_SSL_CA_File:Source_SSL_CA_Path:Source_SSL_Cert:Source_SSL_Cipher:Source_SSL_Key:Seconds_Behind_Source: 0
Source_SSL_Verify_Server_Cert: NoLast_IO_Errno: 0Last_IO_Error:Last_SQL_Errno: 0Last_SQL_Error:Replicate_Ignore_Server_Ids:Source_Server_Id: 1Source_UUID: f37cc1a2-1df0-11f0-a107-92faf2fcb2f7Source_Info_File: mysql.slave_master_infoSQL_Delay: 0SQL_Remaining_Delay: NULLReplica_SQL_Running_State: Replica has read all relay log; waiting for more updatesSource_Retry_Count: 10Source_Bind:Last_IO_Error_Timestamp:Last_SQL_Error_Timestamp:Source_SSL_Crl:Source_SSL_Crlpath:Retrieved_Gtid_Set:Executed_Gtid_Set:Auto_Position: 0Replicate_Rewrite_DB:Channel_Name:Source_TLS_Version:Source_public_key_path:Get_Source_public_key: 0Network_Namespace:
1 row in set (0.00 sec)-- 主库
mysql>  create database test2;
mysql> use test2;
Database changed
mysql> show tables;
Empty set (0.00 sec)mysql> create table test(id int );
Query OK, 0 rows affected (0.06 sec)mysql> insert into test values(1),(2);
Query OK, 2 rows affected (0.02 sec)
Records: 2  Duplicates: 0  Warnings: 0-- 从库
mysql> use test2;
Database changed
mysql> show tables;
+-----------------+
| Tables_in_test2 |
+-----------------+
| test            |
+-----------------+
1 row in set (0.00 sec)mysql> select * from test;
+------+
| id   |
+------+
|    1 |
|    2 |
+------+
2 rows in set (0.00 sec)mysql>   

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Dataway在Spring Boot中的引入以及使用教程

Dataway是Hasor生态中的接口配置工具&#xff0c;能帮助开发者快速配置数据接口。它支持DataQL和SQL两种语言模式&#xff0c;可将SQL转换为DataQL执行&#xff0c;简化数据查询与交互&#xff0c;无需编写大量代码。接口配置完成后&#xff0c;可进行自测、冒烟测试&#xff0…

进程互斥的软件实现方法

单标志法 算法思想&#xff1a;两个进程在访问完临界区后会把使用临界区的权限转交给另一个进程。也就是说每个进程进入临界区的权限只能被另一个进程赋予 int turn 0; //turn 表示当前允许进入临界区的进程号P0 进程&#xff1a; while (turn ! 0); ① //进入区 critical …

力扣150题-- 汇总区间和合并区间

Day 27 题目描述 思路 做法&#xff1a; 特殊处理空数组和数组只有一个元素的情况设置beg&#xff0c;end标记范围的起始和结束&#xff0c;x用来比较元素是否有序&#xff08;初始end和beg都指向nums[0[,x为nums[0]1&#xff09;遍历数组如果当前元素等于x&#xff0c;说明…

【c++深入系列】:万字string详解(附有sso优化版本的string模拟实现源码)

&#x1f525; 本文专栏&#xff1a;c &#x1f338;作者主页&#xff1a;努力努力再努力wz &#x1f4aa; 今日博客励志语录&#xff1a; 当你想放弃时&#xff0c;想想为什么当初坚持走到了这里 ★★★ 本文前置知识&#xff1a; 类和对象&#xff08;上&#xff09; 类和对…

Spark-Streaming简介和核心编程

Spark-Streaming简介 概述&#xff1a;用于流式数据处理&#xff0c;支持Kafka、Flume等多种数据输入源&#xff0c;可使用Spark原语运算&#xff0c;结果能保存到HDFS、数据库等。它以DStream&#xff08;离散化流&#xff09;为抽象表示&#xff0c;是RDD在实时场景的封装&am…

verilog中的约束信息

1、保持约束 keep&#xff1a;当编译器在对FPGA设计进行映射时&#xff0c;一些线网将会被吸收到逻辑块中。 (* KEEP "{TRUE | FALSE}" *) keep_hierarchy:vivado默认会把设计变成一级一级模块化的调用转换为一个没有子模块的超大模块。这个约束会保留部分层级关系…

Missashe考研日记-day24

Missashe考研日记-day24 1 专业课408 学习时间&#xff1a;2h30min学习内容&#xff1a; 今天把剩下的两个经典同步问题和管程部分的课看了&#xff0c;然后做课后习题。这部分的重点在PV大题&#xff0c;很多很经典&#xff0c;不过第一轮不打算做大题&#xff0c;把选择题做…

力扣每日打卡17 49. 字母异位词分组 (中等)

力扣 49. 字母异位词分组 中等 前言一、题目内容二、解题方法1. 哈希函数2.官方题解2.1 前言2.2 方法一&#xff1a;排序2.2 方法二&#xff1a;计数 前言 这是刷算法题的第十七天&#xff0c;用到的语言是JS 题目&#xff1a;力扣 49. 字母异位词分组 (中等) 一、题目内容 给…

C#抽象类和虚方法的作用是什么?

抽象类 (abstract class)&#xff1a; 不能直接实例化&#xff0c;只能被继承。 用来定义一套基础框架和规范&#xff0c;强制子类必须实现某些方法&#xff08;抽象方法&#xff09;。 可用来封装一些共通的逻辑&#xff0c;减少代码重复。 虚方法 (virtual)&#xff1a; …

PowerBi中ALLEXCEPT怎么使用?

在 Power BI 的 DAX 中&#xff0c;ALLEXCEPT() 是一个非常重要的函数&#xff0c;用来实现**“在保留部分筛选条件的前提下&#xff0c;移除其他所有筛选器”**&#xff0c;它常用于 同比、占比、累计汇总 等分析中。 ✅ 一、ALLEXCEPT 是什么意思&#xff1f; 函数全称&…

IQ信号和实信号的关系与转换的matlab实现

IQ信号 IQ信号通常是指两路正交的信号(I路和Q路),在实际信号采样中,通常会进行IQ采样,将实信号转换为复基带信号进行存储。 IQ信号转实信号 IQ信号转为实信号,其实就是将IQ两路正交信号通过上变频合并为一个实数的带通信号,这通常在通信系统中用于将基带信号调制到载…

【锂电池剩余寿命预测】LSTM长短期记忆神经网络锂电池剩余寿命预测(Matlab源码)

目录 效果一览程序获取程序内容代码分享研究内容基于LSTM长短期记忆神经网络的锂电池剩余寿命预测摘要关键词1. 引言1.1 研究背景1.2 研究现状与问题1.3 研究目的与意义2. 文献综述2.1 锂电池剩余寿命预测方法概述2.2 传统预测方法的优势与不足2.3 LSTM在锂电池寿命预测中的应用…

具身智能的理论基础

引言 在人工智能与认知科学快速发展的背景下&#xff0c;“具身智能”&#xff08;Embodied Intelligence&#xff09;这一概念日益受到重视。具身智能是指智能体的认知能力不仅源于其大脑&#xff08;或中央处理单元&#xff09;&#xff0c;更根植于其身体的结构、感官与其所…

【数据结构】励志大厂版·初级(二刷复习)双链表

前引&#xff1a;今天学习的双链表属于链表结构中最复杂的一种&#xff08;带头双向循环链表&#xff09;&#xff0c;按照安排&#xff0c;我们会先进行复习&#xff0c;如何实现双链表&#xff0c;如基本的头插、头删、尾删、尾插&#xff0c;掌握每个细节&#xff0c;随后进…

CSS `display` 属性详解(完整版)

CSS display 属性详解&#xff08;完整版&#xff09; 1. 属性值及特性详解 display 属性控制元素的布局类型和生成的框类型&#xff0c;以下是 所有有效值 及其特性&#xff1a; 1.1 基础类型 值描述布局行为是否生成块级框典型用途block元素独占一行&#xff0c;宽度自动撑…

【数据结构 · 初阶】- 堆的实现

目录 一.初始化 二.插入 三.删除&#xff08;堆顶、根&#xff09; 四.整体代码 Heap.h Test.c Heap.c 我们使用顺序结构实现完全二叉树&#xff0c;也就是堆的实现 以前学的数据结构只是单纯的存储数据。堆除了存储数据&#xff0c;还有其他的价值——排序。是一个功能…

qt.tlsbackend.ossl: Failed to load libssl/libcrypto.

我的环境是windows&#xff0c;QT6.3.2&#xff08;msvc2019_64/mingw_64&#xff09; 出错原因 QT没有正确加载OpenSSL。 解决过程 1、确保安装的有openssl。 文章结尾有个注意&#xff0c;是其他方式安装过openssl&#xff0c;环境变量有&#xff0c;但是QT找不到的问题。…

【Linux】用户权限

shell命令 1. Linux本质上是一个操作系统&#xff0c;但是一般的用户不能直接使用它&#xff0c;而是需要通过外壳程序shell&#xff0c;来与Linux内核进行沟通。 2. shell的简单定义&#xff1a;命令行解释器。主要包含以下作用&#xff1a; 将使用者的命令翻译给核心处理。将…

赛灵思 XC7K325T-2FFG900I FPGA Xilinx Kintex‑7

XC7K325T-2FFG900I 是 Xilinx Kintex‑7 系列中一款工业级 (I) 高性能 FPGA&#xff0c;基于 28 nm HKMG HPL 工艺制程&#xff0c;核心电压标称 1.0 V&#xff0c;I/O 电压可在 0.97 V–1.03 V 之间灵活配置&#xff0c;并可在 –40 C 至 100 C 温度范围内稳定运行。该器件提供…

【题解-Acwing】847. 图中点的层次

题目:847. 图中点的层次 题目描述 给定一个 n 个点 m 条边的有向图,图中可能存在重边和自环。 所有边的长度都是 1,点的编号为 1∼n。 请你求出 1 号点到 n 号点的最短距离,如果从 1 号点无法走到 n 号点,输出 −1 。 输入 第一行包含两个整数 n 和 m。 接下来 m 行…