Mysql数据库的多实例部署
mysql多实例部署
先进行软件下载
上传二进制格式的mysql软件包
[root@cjy ~]# ls
anaconda-ks.cfg mysql-8.0.35-linux-glibc2.28-x86_64.tar.xz
配置用户和组并解压二进制程序至/usr/local下
创建用户和组
[root@cjy ~]# useradd -r -s /sbin/nologin -M mysql解压软件至/usr/local/
[root@cjy ~]# tar xf mysql-8.0.35-linux-glibc2.28-x86_64.tar.xz -C /usr/local/
[root@cjy ~]# cd /usr/local/
[root@cjy local]# ls
bin games lib libexec sbin src
etc include lib64 mysql-8.0.35-linux-glibc2.28-x86_64 share
[root@cjy local]# mv mysql-8.0.35-linux-glibc2.28-x86_64 mysql
[root@cjy local]# ls
bin etc games include lib lib64 libexec mysql sbin share src修改目录/usr/local/mysql的属主属组
[root@cjy local]# chown -R mysql.mysql mysql
[root@cjy local]# ll
total 0
drwxr-xr-x. 2 root root 6 May 16 2022 bin
drwxr-xr-x. 2 root root 6 May 16 2022 etc
drwxr-xr-x. 2 root root 6 May 16 2022 games
drwxr-xr-x. 2 root root 6 May 16 2022 include
drwxr-xr-x. 2 root root 6 May 16 2022 lib
drwxr-xr-x. 3 root root 17 Dec 4 15:58 lib64
drwxr-xr-x. 2 root root 6 May 16 2022 libexec
drwxr-xr-x. 9 mysql mysql 129 Dec 10 16:07 mysql
drwxr-xr-x. 2 root root 6 May 16 2022 sbin
drwxr-xr-x. 5 root root 49 Dec 4 15:58 share
drwxr-xr-x. 2 root root 6 May 16 2022 src配置环境变量
[root@cjy ~]# echo 'export PATH=/usr/local/mysql/bin:$PATH' > /etc/profile.d/mysql.sh
[root@cjy ~]# source /etc/profile.d/mysql.sh
[root@cjy ~]# which mysql
/usr/local/mysql/bin/mysql
创建各实例数据存放的目录
[root@localhost ~]# mkdir -p /opt/data/{3306,3307,3308}[root@localhost ~]# chown -R mysql.mysql /opt/data/[root@localhost ~]# ll /opt/data/
总用量 0
drwxr-xr-x 2 mysql mysql 6 5月 9 21:24 3306
drwxr-xr-x 2 mysql mysql 6 5月 9 21:24 3307
drwxr-xr-x 2 mysql mysql 6 5月 9 21:24 3308[root@localhost ~]# tree /opt/data/
/opt/data/
├── 3306
├── 3307
└── 33083 directories, 0 files
初始化各实例
初始化3306实例
[root@cjy ~]# mysqld --initialize --user mysql --datadir /opt/data/3306
2023-12-10T08:15:59.163216Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.35) initializing of server in progress as process 5030
2023-12-10T08:15:59.170851Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-12-10T08:15:59.416073Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-12-10T08:16:01.622124Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: rsQufqdY3G:8
[root@cjy ~]# echo 'rsQufqdY3G:8' > 3306初始化3307实例
[root@cjy ~]# mysqld --initialize --user mysql --datadir /opt/data/3307
2023-12-10T08:16:42.014859Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.35) initializing of server in progress as process 5072
2023-12-10T08:16:42.022012Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-12-10T08:16:42.217146Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-12-10T08:16:43.678076Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: p!)hzaard9pG
[root@cjy ~]# echo 'p!)hzaard9pG' > 3307初始化3308实例
[root@cjy ~]# mysqld --initialize --user mysql --datadir /opt/data/3308
2023-12-10T08:17:15.877075Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.35) initializing of server in progress as process 5114
2023-12-10T08:17:15.883292Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-12-10T08:17:16.080413Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-12-10T08:17:17.657816Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: w::tf_4x;46J
[root@cjy ~]# echo 'w::tf_4x;46J' > 3308[root@cjy ~]# ls
3306 3307 3308 anaconda-ks.cfg mysql-8.0.35-linux-glibc2.28-x86_64.tar.xz
安装perl
[root@cjy ~]# yum -y install perl
配置配置文件/etc/my.cnf
[root@cjy ~]# vim /etc/my.cnf
[root@cjy ~]# cat /etc/my.cnf
[mysqld_multi]
mysqld = /usr/local/mysql/bin/mysqld_safe
mysqladmin = /usr/local/mysql/bin/mysqladmin[mysqld3306]
datadir = /opt/data/3306
port = 3306
socket = /tmp/mysql3306.sock
pid-file = /opt/data/3306/mysql_3306.pid
log-error=/var/log/3306.log[mysqld3307]
datadir = /opt/data/3307
port = 3307
socket = /tmp/mysql3307.sock
pid-file = /opt/data/3307/mysql_3307.pid
log-error=/var/log/3307.log[mysqld3308]
datadir = /opt/data/3308
port = 3308
socket = /tmp/mysql3308.sock
pid-file = /opt/data/3308/mysql_3308.pid
log-error=/var/log/3308.log
启动各实例
[root@cjy ~]# mysqld_multi start 3306
[root@cjy ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 70 *:33060 *:*
LISTEN 0 151 *:3306 *:*
[root@cjy ~]# mysqld_multi start 3307
[root@cjy ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 70 *:33060 *:*
LISTEN 0 151 *:3307 *:*
LISTEN 0 151 *:3306 *:*
[root@cjy ~]# mysqld_multi start 3308
[root@cjy ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 70 *:33060 *:*
LISTEN 0 151 *:3308 *:*
LISTEN 0 151 *:3307 *:*
LISTEN 0 151 *:3306 *:*
初始化密码
[root@cjy ~]# ls
3306 3307 3308 anaconda-ks.cfg mysql-8.0.35-linux-glibc2.28-x86_64.tar.xz
[root@cjy ~]# cat 3306
rsQufqdY3G:8
[root@cjy ~]# mysql -uroot -p'rsQufqdY3G:8' -P3306 -S /tmp/mysql3306.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.35Copyright (c) 2000, 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 '\h' for help. Type '\c' to clear the current input statement.mysql> alter user root@'localhost' identified with mysql_native_password by 'Passsw0rd@_';
Query OK, 0 rows affected (0.00 sec)mysql> quit
Bye[root@cjy ~]# mysql -uroot -pPassw0rd@_ -P3306 -S /tmp/mysql3306.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.35 MySQL Community Server - GPLCopyright (c) 2000, 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 '\h' for help. Type '\c' to clear the current input statement.mysql> quit
Bye[root@cjy ~]# cat 3307
p!)hzaard9pG
[root@cjy ~]# mysql -uroot -p'p!)hzaard9pG' -P3307 -S /tmp/mysql3307.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.35Copyright (c) 2000, 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 '\h' for help. Type '\c' to clear the current input statement.mysql> alter user root@'localhost' identified with mysql_native_password by 'Passw0rd@_';
Query OK, 0 rows affected (0.00 sec)mysql> quit
Bye
[root@cjy ~]# mysql -uroot -pPassw0rd@_ -P3307 -S /tmp/mysql3307.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.35Copyright (c) 2000, 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 '\h' for help. Type '\c' to clear the current input statement.mysql>quit
Bye[root@cjy ~]# cat 3308
w::tf_4x;46J
[root@cjy ~]# mysql -uroot -p'w::tf_4x;46J' -P3308 -S /tmp/mysql3308.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.35Copyright (c) 2000, 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 '\h' for help. Type '\c' to clear the current input statement.mysql> alter user root@'localhost' identified with mysql_native_password by 'Passw0rd@_';
Query OK, 0 rows affected (0.00 sec)mysql> quit
Bye
[root@cjy ~]# mysql -uroot -pPassw0rd@_ -P3308 -S /tmp/mysql3308.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.35 MySQL Community Server - GPLCopyright (c) 2000, 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 '\h' for help. Type '\c' to clear the current input statement.mysql> quit
Bye
停止端口号
[root@cjy ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 70 *:33060 *:*
LISTEN 0 151 *:3308 *:*
LISTEN 0 151 *:3307 *:*
LISTEN 0 151 *:3306 *:*
[root@cjy ~]# kill -9 $(ps -ef|grep -v 'grep' | grep 3306 | awk '{print $2}')
[root@cjy ~]# kill -9 $(ps -ef|grep -v 'grep' | grep 3307 | awk '{print $2}')
[root@cjy ~]# kill -9 $(ps -ef|grep -v 'grep' | grep 3308 | awk '{print $2}')
[root@cjy ~]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
[root@cjy ~]# cd /usr/lib/systemd/system
[root@cjy system]# cp sshd.service mysql3306.service
[root@cjy system]# vim mysql3306.service
[root@cjy system]# cat mysql3306.service
[Unit]
Description=mysql 3306 server daemon
After=network.target[Service]
Type=forking
ExecStart=/usr/local/mysql/bin/mysqld_multi start3306
ExecStop=kill -9 $(ps -ef|grep -v 'grep' | grep 3306 | awk '{print $2}')
ExecReload=/bin/kill -HUP $MAINPID[Install]
WantedBy=multi-user.target
[root@cjy system]# cp mysql3306.service mysql3307.service
[root@cjy system]# cp mysql3306.service mysql3308.service
[root@cjy system]# vim mysql3307.service
[root@cjy system]# cat mysql3307.service
[Unit]
Description=mysql 3307 server daemon
After=network.target[Service]
Type=forking
ExecStart=/usr/local/mysql/bin/mysqld_multi start3307
ExecStop=kill -9 $(ps -ef|grep -v 'grep' | grep 3307 | awk '{print $2}')
ExecReload=/bin/kill -HUP $MAINPID[Install]
WantedBy=multi-user.target[root@cjy system]# vim mysql3308.service
[root@cjy system]# cat mysql3308.service
[Unit]
Description=mysql 3308 server daemon
After=network.target[Service]
Type=forking
ExecStart=/usr/local/mysql/bin/mysqld_multi start3308
ExecStop=kill -9 $(ps -ef|grep -v 'grep' | grep 3308 | awk '{print $2}')
ExecReload=/bin/kill -HUP $MAINPID[Install]
WantedBy=multi-user.target
[root@cjy ~]# ln -s /usr/local/mysql/bin/my_print_defaults /usr/bin/
[root@cjy ~]# which my_print_defaults
/usr/local/mysql/bin/my_print_defaults
[root@cjy ~]# systemctl daemon-reload
[root@cjy ~]# systemctl start mysql3306
[root@cjy ~]# systemctl start mysql3307
[root@cjy ~]# systemctl start mysql3308
再设置开机自启
[root@cjy ~]# systemctl enable mysql3306
Created symlink /etc/systemd/system/multi-user.target.wants/mysql3306.service → /usr/lib/systemd/system/mysql3306.service.
[root@cjy ~]# systemctl enable mysql3307
Created symlink /etc/systemd/system/multi-user.target.wants/mysql3307.service → /usr/lib/systemd/system/mysql3307.service.
[root@cjy ~]# systemctl enable mysql3308
Created symlink /etc/systemd/system/multi-user.target.wants/mysql3308.service → /usr/lib/systemd/system/mysql3308.service.
[root@cjy ~]# systemctl status mysql3306
相关文章:
Mysql数据库的多实例部署
mysql多实例部署 先进行软件下载 上传二进制格式的mysql软件包 [rootcjy ~]# ls anaconda-ks.cfg mysql-8.0.35-linux-glibc2.28-x86_64.tar.xz配置用户和组并解压二进制程序至/usr/local下 创建用户和组 [rootcjy ~]# useradd -r -s /sbin/nologin -M mysql解压软件至/usr…...

陈巍:Sora大模型技术精要万字详解(上)——原理、关键技术、模型架构详解与应用
目录 收起 1 Sora的技术特点与原理 1.1 技术特点概述 1.2 时间长度与时序一致性 1.3 真实世界物理状态模拟 1.4 Sora原理 1.4.1扩散模型与单帧图像的生成 1.4.2 Transformer模型与连续视频语义的生成 1.4.3 从文本输入到视频生成 2 Sora的关键技术 2.1 传统文生图技…...

JS原型和原型链的理解
原型链图,图中Parent是构造函数,p1是通过Parent实例化出来的一个对象 前置知识 js中对象和函数的关系,函数其实是对象的一种 函数、构造函数的区别,任何函数都可以作为构造函数,但是并不能将任意函数叫做构造函数&…...

力扣题单(小白友好)
力扣题单 算法小白自用题单,目前对于一些简单的数据结构感觉掌握的还可以,但是力扣很多题还是需要看题解,不够熟练;故整理了一份题单,用于巩固练习; 网上确实有很多对于算法分类讲解的网站,but:有一丢丢选择困难症,每天不知道该刷什么题,再加上网站对于一类题一般就有十几道题目…...
王道c语言ch11-单链表的新建、插入、删除例题
王道c语言ch11-单链表的新建、插入、删除例题 #include <stdio.h> #include <stdlib.h> #define END 33typedef int ElemType;typedef struct LNote {ElemType data;struct LNote *next; } LNote, *LinkList;//头插法 void list_head_insert(LinkList &L) {El…...
蓝桥杯刷题--python-23
2.危险系数 - 蓝桥云课 (lanqiao.cn) n, m map(int, input().split()) map_ [[] for i in range(n 1)] used [0 for i in range(n 1)] used_ [0 for i in range(n 1)] cnt 0 res [] for _ in range(m):u, v map(int, input().split())map_[u].append(v)map_[v].appen…...
蓝桥杯刷题--python-24
0地图 - 蓝桥云课 (lanqiao.cn) from math import * import sys from functools import lru_cache # sys.setrecursionlimit(100000) n, m, k map(int, input().split()) a [input() for i in range(n)] dr [(0, 1), (1, 0)] cnt 0 lru_cache(maxsizeNone) def dfs(x, y, …...

面向对象(C# )
面向对象(C# ) 文章目录 面向对象(C# )ref 和 out传值调用和引用调用ref 和 out 的使用ref 和 out 的区别 结构体垃圾回收GC封装成员属性索引器静态成员静态类静态构造函数拓展方法运算符重载内部类和分布类 继承里氏替换继承中的…...
Lombok:@Cleanup资源释放利器
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 目录 一、Cleanup介绍 二、使用示例 三、价值阐述 总结 提示:以下是本篇文章正文内容,下面案例可供参考 一、Cleanup介绍 Cleanup可以自动管理输…...

IoT 物联网场景中 LoRa + 蓝牙Bluetooth 室内场馆高精定位技术全面解析
基于LoRa蓝牙的室内场景定位技术,蓝牙主要负责位置服务,LoRa主要负责数据传输。 01 LoRa和蓝牙技术 LoRa全称 “Long Rang”,是一种成熟的基于扩频技术的低功耗、超长距离的LPWAN无线通信技术。LoRa主要采用的是窄带扩频技术,抗干…...

SpringCloudAlibaba系列之Seata实战
目录 环境准备 1.下载seata安装包 2.修改配置文件 3.准备seata所需配置文件 4.初始化seata所需数据库 5.运行seata 服务准备 分布式事务测试 环境准备 1.下载seata安装包 Seata-Server下载 | Apache Seata 本地环境我们选择稳定版的二进制下载。 下载之后解压到指定目录…...
蓝桥杯day5刷题日记-分巧克力-天干地支-求和
P8647 [蓝桥杯 2017 省 AB] 分巧克力 思路:二分查找 #include <iostream> using namespace std; int n,k; int h[100010],w[100010];bool check(int x) {int sum0;for(int i0;i<n;i){sum(h[i]/x)*(w[i]/x);if(sum>k) return true;}return false; }int…...
C++ ostringstream用法详解
std::ostringstream 是 C 标准库中的一个输出字符串流类,它可以用于将各种数据类型转换为字符串,并且支持格式控制和字符串拼接操作。 目录 1. 头文件 2. 基本用法 3. 将各种数据类型转换为字符串 4. 格式控制 5. 清空和重置 6. 拼接字符串 1. 头…...

并发编程所需的底层基础
一、计算机运行的底层原理 1.多级层次的存储结构 ①:辅存 固态盘不是主要的应用对象,因为固态盘的使用次数是有限的,无法支撑高并发场景 磁盘存储的最基本原理是电生磁。 磁盘的磁道里边有很多的磁颗粒,磁颗粒上边有一层薄膜为了防止磁点氧…...
各种小功能
目录 Python在指定目录创建多个相似命名的文件夹 Python 在指定目录创建多个相似命名的文件夹...

vue前端解析jwt
vue前端解析jwt 我们可以用在线解析看解析的结果:https://www.lddgo.net/encrypt/jwt-decrypt 但是如果在前端需要解析token,拿到其中的权限信息,可以这样解决。 在线的: 完美解决: 代码: function par…...

【Flutter 面试题】Flutter如何进行本地存储和缓存数据?
【Flutter 面试题】Flutter如何进行本地存储和缓存数据? 文章目录 写在前面口述回答补充说明实际案例完整代码示例运行结果详细说明 写在前面 🙋 关于我 ,小雨青年 👉 CSDN博客专家,GitChat专栏作者,阿里云…...

Docker 笔记(八)--Dockerfile
目录 1. 背景2. 参考3. 原文3.1 Dockerfile 支持的指令3.2 Dockerfile格式3.3 Parser指令syntaxescape 3.4 环境变量替换3.5 docker构建忽略文件3.6 Shell 和 exec 格式Exec 格式Shell 格式使用不同的 shell 3.7 FROM指令了解ARG和FROM如何交互 3.8 RUN指令RUN指令缓存失效RUN …...

C语言每日一题06
一、题目 二、解析 void main () { char c1,c2; int a1,a2; c1 getchar ();//读取第一个输入,c11 scanf (“%3d”,&a1ÿ…...
spring redis 工具类
1、引入jar <!-- redis 缓存操作 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></dependency>2、代码 /*** 缓存基本的对象,Integer、String、…...
应用升级/灾备测试时使用guarantee 闪回点迅速回退
1.场景 应用要升级,当升级失败时,数据库回退到升级前. 要测试系统,测试完成后,数据库要回退到测试前。 相对于RMAN恢复需要很长时间, 数据库闪回只需要几分钟。 2.技术实现 数据库设置 2个db_recovery参数 创建guarantee闪回点,不需要开启数据库闪回。…...

K8S认证|CKS题库+答案| 11. AppArmor
目录 11. AppArmor 免费获取并激活 CKA_v1.31_模拟系统 题目 开始操作: 1)、切换集群 2)、切换节点 3)、切换到 apparmor 的目录 4)、执行 apparmor 策略模块 5)、修改 pod 文件 6)、…...
React Native在HarmonyOS 5.0阅读类应用开发中的实践
一、技术选型背景 随着HarmonyOS 5.0对Web兼容层的增强,React Native作为跨平台框架可通过重新编译ArkTS组件实现85%以上的代码复用率。阅读类应用具有UI复杂度低、数据流清晰的特点。 二、核心实现方案 1. 环境配置 (1)使用React Native…...
大模型多显卡多服务器并行计算方法与实践指南
一、分布式训练概述 大规模语言模型的训练通常需要分布式计算技术,以解决单机资源不足的问题。分布式训练主要分为两种模式: 数据并行:将数据分片到不同设备,每个设备拥有完整的模型副本 模型并行:将模型分割到不同设备,每个设备处理部分模型计算 现代大模型训练通常结合…...

ardupilot 开发环境eclipse 中import 缺少C++
目录 文章目录 目录摘要1.修复过程摘要 本节主要解决ardupilot 开发环境eclipse 中import 缺少C++,无法导入ardupilot代码,会引起查看不方便的问题。如下图所示 1.修复过程 0.安装ubuntu 软件中自带的eclipse 1.打开eclipse—Help—install new software 2.在 Work with中…...
根据万维钢·精英日课6的内容,使用AI(2025)可以参考以下方法:
根据万维钢精英日课6的内容,使用AI(2025)可以参考以下方法: 四个洞见 模型已经比人聪明:以ChatGPT o3为代表的AI非常强大,能运用高级理论解释道理、引用最新学术论文,生成对顶尖科学家都有用的…...

Java面试专项一-准备篇
一、企业简历筛选规则 一般企业的简历筛选流程:首先由HR先筛选一部分简历后,在将简历给到对应的项目负责人后再进行下一步的操作。 HR如何筛选简历 例如:Boss直聘(招聘方平台) 直接按照条件进行筛选 例如:…...

【从零学习JVM|第三篇】类的生命周期(高频面试题)
前言: 在Java编程中,类的生命周期是指类从被加载到内存中开始,到被卸载出内存为止的整个过程。了解类的生命周期对于理解Java程序的运行机制以及性能优化非常重要。本文会深入探寻类的生命周期,让读者对此有深刻印象。 目录 …...
苹果AI眼镜:从“工具”到“社交姿态”的范式革命——重新定义AI交互入口的未来机会
在2025年的AI硬件浪潮中,苹果AI眼镜(Apple Glasses)正在引发一场关于“人机交互形态”的深度思考。它并非简单地替代AirPods或Apple Watch,而是开辟了一个全新的、日常可接受的AI入口。其核心价值不在于功能的堆叠,而在于如何通过形态设计打破社交壁垒,成为用户“全天佩戴…...
Python竞赛环境搭建全攻略
Python环境搭建竞赛技术文章大纲 竞赛背景与意义 竞赛的目的与价值Python在竞赛中的应用场景环境搭建对竞赛效率的影响 竞赛环境需求分析 常见竞赛类型(算法、数据分析、机器学习等)不同竞赛对Python版本及库的要求硬件与操作系统的兼容性问题 Pyth…...