当前位置: 首页 > news >正文

2024年8月7日(mysql主从 )

回顾
主服务器

[root@master_mysql ~]# yum -y install rsync

[root@master_mysql ~]# tar -xf mysql-8.0.33-linux-glibc2.12-x86_64.tar 

[root@master_mysql ~]# tar -xf mysql-8.0.33-linux-glibc2.12-x86_64.tar.xz

[root@master_mysql ~]# cp -r mysql-8.0.33-linux-glibc2.12-x86_64 /usr/local/mysql
[root@master_mysql ~]# cd /usr/local/mysql/
[root@master_mysql mysql]# mkdir mysql-files
[root@master_mysql mysql]# useradd -r -s /sbin/nologin mysql

[root@master_mysql mysql]# id mysql
uid=997(mysql) gid=995(mysql) 组=995(mysql)
[root@master_mysql mysql]# chown mysql:mysql ./mysql-files/

[root@master_mysql mysql]# rm -rf /etc/my.cnf
[root@master_mysql mysql]# ./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql/

[root@master_mysql mysql]# ./bin/mysql_ssl_rsa_setup --datadir=/usr/local/mysql/data

[root@master_mysql mysql]# cp support-files/mysql.server /etc/init.d/mysql8

[root@master_mysql mysql]# vim my.cnf

[mysqld]
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
port=3306
log-error=/usr/local/mysql/data/db01-master.err
log-bin=/usr/local/mysql/data/binlog
server-id=10
character_set_server=utf8mb4

[root@master_mysql mysql]# service mysql8 start
. SUCCESS! 
[root@master_mysql mysql]# ./bin/mysql -P 3306 -p

mysql> alter user 'root'@'localhost' identified by '123456';
mysql> exit

[root@master_mysql mysql]# service mysql8 restart
Shutting down MySQL. SUCCESS! 
Starting MySQL.. SUCCESS! 

从服务器(不用初始化也不用启动)

[root@slave_mysql ~]# yum -y install rsync

[root@slave_mysql ~]# tar -xf mysql-8.0.33-linux-glibc2.12-x86_64.tar 
[root@slave_mysql ~]# tar -xf mysql-8.0.33-linux-glibc2.12-x86_64.tar.xz

[root@slave_mysql ~]# cp -r mysql-8.0.33-linux-glibc2.12-x86_64 /usr/local/mysql
[root@slave_mysql ~]# useradd -r -s /sbin/nologin mysql
[root@slave_mysql ~]# mkdir /usr/local/mysql/mysql-files
[root@slave_mysql ~]# chown mysql:mysql /usr/local/mysql/mysql-files/

[root@slave_mysql ~]# rm -rf /etc/my.cnf
[root@slave_mysql ~]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql8

主服务器(同步)

[root@master_mysql ~]# rm -rf /usr/local/mysql/data/auto.cnf 
[root@master_mysql ~]# service mysql8 stop
Shutting down MySQL. SUCCESS! 
[root@master_mysql ~]# rm -rf /usr/local/mysql/data/auto.cnf 
[root@master_mysql ~]# ls /usr/local/mysql/data/
[root@master_mysql ~]# rsync -av /usr/local/mysql/data root@192.168.8.165:/usr/local/mysql/  #从服务器IP地址

从服务器

[root@slave_mysql ~]# vim /usr/local/mysql/data/my.cnf

[mysqld]
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
log-error=/usr/local/mysql/data/err.log
log-relay=/usr/local/mysql/data/relaylog
character_set_server=utf8mb4
server-id=11

[root@slave_mysql ~]# service mysql8 start

[root@slave_mysql ~]# /usr/local/mysql/bin/mysql -p123456

1、 主从复制的实现

 [root@master_mysql ~]# vim /etc/profile

export PATH=/usr/local/mysql/bin:$PATH

[root@master_mysql ~]# sorce /etc/profile

mysql> create user 'slave'@'192.168.8.%' identified by 'slave_123'
';
Query OK, 0 rows affected (0.01 sec)mysql> grant replication slave on *.* to 'slave'@'192.168.8.%';
Query OK, 0 rows affected (0.01 sec)mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)mysql> flush tables with read lock;
Query OK, 0 rows affected (0.00 sec)
mysql> show master status;

[root@slave_mysql ~]# vim /etc/profile

export PATH=/usr/local/mysql/bin:$PATH

[root@slave_mysql ~]# source /etc/profile 

[root@slave_mysql ~]# mysql -h192.168.8.164 -uslave -pslave_123 --get-server-public-key

[root@slave_mysql ~]# mysql -p123456 -P3306

mysql> stop slave;
Query OK, 0 rows affected, 1 warning (0.00 sec)mysql> reset slave;
Query OK, 0 rows affected, 1 warning (0.01 sec)mysql> change master to-> master_host='192.168.8.164',-> master_user='slave',-> master_password='slave_123',-> master_log_file='binlog.000009',-> master_log_pos=447;
Query OK, 0 rows affected, 8 warnings (0.00 sec)mysql> start slave;
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> show slave status\G;
2、主服务器创建表并向表里添加数据
mysql> unlock tables;
Query OK, 0 rows affected (0.00 sec)mysql> create database if not exists test charset utf8mb4;
Query OK, 1 row affected (0.00 sec)mysql> use test;
Database changed
mysql> create table student(id int primary key,name varchar(45) not null,gender varchar(4) not null);
Query OK, 0 rows affected (0.01 sec)mysql> insert into student values(1,'张三','男');
Query OK, 1 row affected (0.02 sec)mysql> insert into student values(2,'凤凰','女');
Query OK, 1 row affected (0.01 sec)mysql> insert into student values(3,'张三','男');
Query OK, 1 row affected (0.00 sec)
mysql> select * from student;
+----+--------+--------+
| id | name   | gender |
+----+--------+--------+
|  1 | 张三   | 男     |
|  2 | 凤凰   | 女     |
|  3 | 张三   | 男     |
+----+--------+--------+
3 rows in set (0.00 sec)
3、从服务器查看同步并写入东西(从服务器不容许写入东西)
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
+--------------------+
5 rows in set (0.00 sec)mysql> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> select * from student;
+----+--------+--------+
| id | name   | gender |
+----+--------+--------+
|  1 | 张三   | 男     |
|  2 | 凤凰   | 女     |
|  3 | 张三   | 男     |
+----+--------+--------+
3 rows in set (0.00 sec)mysql> insert into student values(4,'李网','女');
Query OK, 1 row affected (0.00 sec)mysql> select * from student;
+----+--------+--------+
| id | name   | gender |
+----+--------+--------+
|  1 | 张三   | 男     |
|  2 | 凤凰   | 女     |
|  3 | 张三   | 男     |
|  4 | 李网   | 女     |
+----+--------+--------+
4 rows in set (0.00 sec)
4、主服务器插入数据
mysql> insert into student values(6,'章节','男');
Query OK, 1 row affected (0.01 sec)mysql> select * from student;
+----+--------+--------+
| id | name   | gender |
+----+--------+--------+
|  1 | 张三   | 男     |
|  2 | 凤凰   | 女     |
|  3 | 张三   | 男     |
|  6 | 章节   | 男     |
+----+--------+--------+
4 rows in set (0.00 sec)
5、从服务器查看同步
mysql> select * from student;
+----+--------+--------+
| id | name   | gender |
+----+--------+--------+
|  1 | 张三   | 男     |
|  2 | 凤凰   | 女     |
|  3 | 张三   | 男     |
|  4 | 李网   | 女     |
|  6 | 章节   | 男     |
+----+--------+--------+
5 rows in set (0.00 sec)
二、SQL语句
1、新增

1. insert into库名称.表名

        (id,username,password)values(1,"abc","123")

2. insert into 表名称 values(1, "name","word")

3. insert into 表名称 select* from 其他表

4. insert into 表 values (),()

2、删除

1. delete from 表名

2. deletefrom表名称 where id=3

3. delete from 表名称 where age>8

4. delete from 表 where name on ("a","b","c")

3、修改

 1. update mysql.user set host='%' where name='root'

 2. update user set password='abc' where username="zhangsan"

4、查询
        1. 单表查询

1.1 select 字段名列表 from表名称,索引

1.2

5、远程连接数据库的

username

password

url (mysql IP或者域名 数据库名称 端口号 )

mysql> create user 'li'@'%' identified by '123';
Query OK, 0 rows affected (0.02 sec)mysql> grant all on *.* to 'li'@'%';
Query OK, 0 rows affected (0.01 sec)mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)mysql> select count(*) from student;
+----------+
| count(*) |
+----------+
|        4 |
+----------+
1 row in set (0.06 sec)mysql> select count(1) from student;
+----------+
| count(1) |
+----------+
|        4 |
+----------+
1 row in set (0.06 sec)mysql> select a.*,b.* from student as a,student as b;
+----+--------+--------+----+--------+--------+
| id | name   | gender | id | name   | gender |
+----+--------+--------+----+--------+--------+
|  6 | 章节   | 男     |  1 | 张三   | 男     |
|  3 | 张三   | 男     |  1 | 张三   | 男     |
|  2 | 凤凰   | 女     |  1 | 张三   | 男     |
|  1 | 张三   | 男     |  1 | 张三   | 男     |
|  6 | 章节   | 男     |  2 | 凤凰   | 女     |
|  3 | 张三   | 男     |  2 | 凤凰   | 女     |
|  2 | 凤凰   | 女     |  2 | 凤凰   | 女     |
|  1 | 张三   | 男     |  2 | 凤凰   | 女     |
|  6 | 章节   | 男     |  3 | 张三   | 男     |
|  3 | 张三   | 男     |  3 | 张三   | 男     |
|  2 | 凤凰   | 女     |  3 | 张三   | 男     |
|  1 | 张三   | 男     |  3 | 张三   | 男     |
|  6 | 章节   | 男     |  6 | 章节   | 男     |
|  3 | 张三   | 男     |  6 | 章节   | 男     |
|  2 | 凤凰   | 女     |  6 | 章节   | 男     |
|  1 | 张三   | 男     |  6 | 章节   | 男     |
+----+--------+--------+----+--------+--------+#别名
mysql> select id as 编号,name,gender from student;
+--------+--------+--------+
| 编号   | name   | gender |
+--------+--------+--------+
|      1 | 张三   | 男     |
|      2 | 凤凰   | 女     |
|      3 | 张三   | 男     |
|      6 | 章节   | 男     |
+--------+--------+--------+
6、mysql函数

排序:max min

汇总:count sum avg

数制:二进制 八进制 十进制 十六进制

只有select子句和having子句,order by 子句中能使用聚合函数1,where子句红中不能使用聚合函数,当使用聚合函数查询以后,不能使用where条件,如果添加条件 ,就使用having

mysql> select * from student order by gender desc;
+----+--------+--------+
| id | name   | gender |
+----+--------+--------+
|  1 | 张三   | 男     |
|  3 | 张三   | 男     |
|  6 | 章节   | 男     |
|  2 | 凤凰   | 女     |
+----+--------+--------+
4 rows in set (0.00 sec)mysql> select * from student order by gender asc;
+----+--------+--------+
| id | name   | gender |
+----+--------+--------+
|  2 | 凤凰   | 女     |
|  1 | 张三   | 男     |
|  3 | 张三   | 男     |
|  6 | 章节   | 男     |
+----+--------+--------+
4 rows in set (0.00 sec)mysql> select gender as 性别,count(gender) as 人数 from student grroup by gender;
+--------+--------+
| 性别   | 人数   |
+--------+--------+
| 男     |      3 |
| 女     |      1 |
+--------+--------+
2 rows in set (0.00 sec)mysql> create table product(-> id int primary key auto_increment,-> name varchar(45) not null,-> price float not null,-> qty int not null);
Query OK, 0 rows affected (0.01 sec)mysql> desc product;
+-------+-------------+------+-----+---------+----------------+
| Field | Type        | Null | Key | Default | Extra          |
+-------+-------------+------+-----+---------+----------------+
| id    | int         | NO   | PRI | NULL    | auto_increment |
| name  | varchar(45) | NO   |     | NULL    |                |
| price | float       | NO   |     | NULL    |                |
| qty   | int         | NO   |     | NULL    |                |
+-------+-------------+------+-----+---------+----------------+
4 rows in set (0.01 sec)mysql> insert into product (name,price,qty) values("香蕉",8.5,200);
Query OK, 1 row affected (0.00 sec)mysql> insert into product (name,price,qty) values("苹果",12.5,40)0);
Query OK, 1 row affected (0.00 sec)mysql> insert into product (name,price,qty) values("菠萝",12.4,700);
Query OK, 1 row affected (0.01 sec)mysql> insert into product (name,price,qty) values("哈密瓜",18.3,7400);
Query OK, 1 row affected (0.00 sec)mysql> select * from product order by price;
+----+-----------+-------+-----+
| id | name      | price | qty |
+----+-----------+-------+-----+
|  1 | 香蕉      |   8.5 | 200 |
|  3 | 菠萝      |  12.4 |  70 |
|  2 | 苹果      |  12.5 | 400 |
|  4 | 哈密瓜    |  18.3 | 400 |
+----+-----------+-------+-----+mysql> select * from (select * from product order by qty) as a ordder by a.price;
+----+-----------+-------+-----+
| id | name      | price | qty |
+----+-----------+-------+-----+
|  1 | 香蕉      |   8.5 | 200 |
|  3 | 菠萝      |  12.4 |  70 |
|  2 | 苹果      |  12.5 | 400 |
|  4 | 哈密瓜    |  18.3 | 400 |
+----+-----------+-------+-----+
4 rows in set (0.00 sec)mysql> select max(price) from product;
+------------+
| max(price) |
+------------+
|       18.3 |
+------------+
1 row in set (0.00 sec)mysql> select min(price) from product;
+------------+
| min(price) |
+------------+
|        8.5 |
+------------+
1 row in set (0.00 sec)mysql> select sum(price) from product;
+-------------------+
| sum(price)        |
+-------------------+
| 51.69999885559082 |
+-------------------+
1 row in set (0.01 sec)

相关文章:

2024年8月7日(mysql主从 )

回顾 主服务器 [rootmaster_mysql ~]# yum -y install rsync [rootmaster_mysql ~]# tar -xf mysql-8.0.33-linux-glibc2.12-x86_64.tar [rootmaster_mysql ~]# tar -xf mysql-8.0.33-linux-glibc2.12-x86_64.tar.xz [rootmaster_mysql ~]# cp -r mysql-8.0.33-linux-glibc2.…...

接口/自动化测试 面试集合

1. apache和nginx的区别? Nginx相对Apache的优点: 轻量级,同样起web服务,比apache占用更少的内存及资源; 抗并发,nginx处理请求是异步非阻塞的,支持更多的并发连接,而apache则是阻塞型的,在高 并发下ngi…...

菜鸡勇闯第136场双周赛

菜鸡鼓足了勇气报名了力扣双周赛(后来复盘才知道双周赛更难一点,我真是头铁。。) 没想到还拿了个竞赛名次哈哈哈哈哈还在前50%,小力它真的,我哭死 为什么我本科被高数老师忽悠,去打了两年数模o(≧口≦)o 每…...

趋动科技陈飞:从小模型到大模型,AI时代下的数据中心建设

自AI大模型横空出世,不断推动着AI从学术界到产业界向大众破圈,新的时代正在来临。11月15-16日,由CDCC主办的“2023第11届数据中心标准大会”在北京国家会议中心盛大开幕。 本届大会的主题围绕“AI时代 重塑未来”,聚焦数据中心领…...

yolo v8 + flask部署到云服务器,以及问题记录

环境安装 1、运行项目报错:no python application found, check your startup logs for errors 在云服务器pytorch版本安装错了,安装了GPU版本,需要安装CPU版本 # CPU only 使用下面这段代码避免出现第二个错误 pip install torch2.3.1 to…...

【科研必备插件】easyscholar如何使文章显示期刊影响因子与分区等级

简要介绍 EasyScholar 是一个微软 Edge 浏览器的扩展程序,可以显示会议、期刊等级。可支持在各大论文搜索网站,显示各种期刊、会议等级排名 要想你的知网页面如下图所示,快来获取安装,快速科研有方法 插件安装教程 ①打开浏览器…...

UE5 UrlEncode转换

调用接口时用到了 UFUNCTION(BlueprintPure, Category "FuncLib", meta (Keywords "URL1"))static FString StringToURLEncode(const FString& str1);FString UBasicFuncLib::StringToURLEncode(const FString& str1){return FGenericPlatformH…...

【QML】Qt.rgba()的正确使用方法

1. 问题 设置颜色 color: Qt.rgba(65,105,225,255) ,应该是蓝色,却显示白色。 2. 正确方法 //正确代码 color: Qt.rgba(65/255, 105/255, 225/255, 255/255)...

centos7.9 docker安装

1、不要通过yum直接安装 具体原因: CentOS 6 因内核太旧,即使支持安装 docker,但会有各种问题,不建议安装CentOS 7 的 extras 源虽然可以安装 docker,但包比较旧,建议从官方源或镜像源站点下载安装 docke…...

spring操作数据库

xml版 程序结构 配置文件 dbUtil-阿帕奇提供操作数据库的插件 核心类&#xff1a;QueryRunner .query() 查询 .update() 增删改 <dependencies><!-- spring --><dependency><groupId>org.springframework</groupId><artifactId>spri…...

Apache Flink中TaskManager,SubTask,TaskSlot,并行度之间的关系

Apache Flink 中Application 与 Job 一个完整的Flink Application 一般组成如下&#xff1a; Source 数据来源Transformation 数据转换处理等Sink 数据传输 Flink 中一个或者多个Operator&#xff08;算子&#xff09;组合对数据进行转换形成一个 Transformation&#xff0c;一…...

马斯克xAI新计划:人工智能模型Grok 2测试版即将发布

特斯拉CEO马斯克在X平台上表示&#xff0c;人工智能模型Grok 2测试版即将发布。Grok&#xff0c;作为xAI公司的明星大语言模型&#xff0c;其首代产品Grok 1已凭借神经演化计算与深度学习技术的深度融合&#xff0c;展现了超乎想象的学习速度与智能深度&#xff0c;赢得了业界的…...

【机器人学】6-4.六自由度机器人运动学参数辨识-机器人精度验证【附MATLAB代码】

前言 前两个章节以及完成了机器人参数辨识。 【机器人学】6-1.六自由度机器人运动学参数辨识-辨识数学模型的建立 【机器人学】6-2.六自由度机器人运动学参数辨识-优化方法求解辨识参数 这里我们认为激光测量仪测量到的数据为机器人实际到达的位置&#xff0c;而机器人理论到…...

分销商城小程序系统渠道拓展

线上卖货渠道很多&#xff0c;想要不断提高营收和新客获取&#xff0c;除了自己和工具本身努力外&#xff0c;还需要其他人的帮助来提高商城店铺的整体销量。 搭建saas商城系统网站/小程序&#xff0c;后台上货&#xff0c;设置支付、配送、营销、精美模板商城装修等内容&…...

WPF篇(14)-ProgressBar进度条+Calendar日历控件+DatePicker日期控件

ProgressBar进度条 ProgressBar进度条通常在我们执行某个任务需要花费大量时间时使用&#xff0c;这时可以采用进度条显示任务或线程的执行进度&#xff0c;以便给用户良好的使用体验。 ProgressBar类定义 public class ProgressBar : RangeBase {public static readonly De…...

链表高频题目和必备技巧

链表高频题目和必备技巧 1. 链表类题目注意点 1&#xff0c;如果笔试中空间要求不严格&#xff0c;直接使用容器来解决链表问题 2&#xff0c;如果笔试中空间要求严格、或者在面试中面试官强调空间的优化&#xff0c;需要使用额外空间复杂度**O(1)**的方法 3&#xff0c;最…...

Vue3详细介绍,正则采集器所用前端框架

Vue3 引入了一个全新的响应式系统&#xff0c;它是基于ES6的Proxy特性构建的。这个系统使得 Vue 能够更加高效地追踪数据的变化&#xff0c;并在数据发生变化时自动更新DOM。响应式系统的核心是"可观察"&#xff0c;当数据变化时&#xff0c;视图会响应这些变化并重新…...

数据集--COCO2017(快速下载)

1、数据集介绍 数据集官网&#xff1a;https://cocodataset.org/#home COCO&#xff08;Common Objects in Context&#xff09;数据集是计算机视觉领域中最广泛使用的数据集之一&#xff0c;主要用于目标检测、分割和图像标注任务。COCO 数据集由 Microsoft 发布&#xff0c…...

【管理咨询宝藏159】顶级咨询公司人力三支柱建设方案思路

阅读完整版报告内容&#xff0c;请搜索VV号“管理咨询宝藏”。 【管理咨询宝藏159】顶级咨询公司人力三支柱建设方案思路 【格式】PDF版本 【关键词】人力咨询、三支柱、人力体系 【核心观点】 - 集团总部制定全集团共享中心总体规划路径&#xff0c;组织并负责实施与推广。各…...

跨时钟域总结

跨时钟域总结 秋招学习跨时钟域 总结一下吧 异步电路 设计中有两个频率不同的时钟(也可能多个),而有数据在两组时钟之间传输 单bit跨时钟域 慢时钟域数据-> 快时钟域 方法 : 使用两个锁存器 (打两拍) 数据跨时钟域同步过程中,脉冲宽度会改变&#xff0c;不影响同步结…...

生成xcframework

打包 XCFramework 的方法 XCFramework 是苹果推出的一种多平台二进制分发格式&#xff0c;可以包含多个架构和平台的代码。打包 XCFramework 通常用于分发库或框架。 使用 Xcode 命令行工具打包 通过 xcodebuild 命令可以打包 XCFramework。确保项目已经配置好需要支持的平台…...

前端倒计时误差!

提示:记录工作中遇到的需求及解决办法 文章目录 前言一、误差从何而来?二、五大解决方案1. 动态校准法(基础版)2. Web Worker 计时3. 服务器时间同步4. Performance API 高精度计时5. 页面可见性API优化三、生产环境最佳实践四、终极解决方案架构前言 前几天听说公司某个项…...

UE5 学习系列(三)创建和移动物体

这篇博客是该系列的第三篇&#xff0c;是在之前两篇博客的基础上展开&#xff0c;主要介绍如何在操作界面中创建和拖动物体&#xff0c;这篇博客跟随的视频链接如下&#xff1a; B 站视频&#xff1a;s03-创建和移动物体 如果你不打算开之前的博客并且对UE5 比较熟的话按照以…...

Rust 异步编程

Rust 异步编程 引言 Rust 是一种系统编程语言,以其高性能、安全性以及零成本抽象而著称。在多核处理器成为主流的今天,异步编程成为了一种提高应用性能、优化资源利用的有效手段。本文将深入探讨 Rust 异步编程的核心概念、常用库以及最佳实践。 异步编程基础 什么是异步…...

Ascend NPU上适配Step-Audio模型

1 概述 1.1 简述 Step-Audio 是业界首个集语音理解与生成控制一体化的产品级开源实时语音对话系统&#xff0c;支持多语言对话&#xff08;如 中文&#xff0c;英文&#xff0c;日语&#xff09;&#xff0c;语音情感&#xff08;如 开心&#xff0c;悲伤&#xff09;&#x…...

AI书签管理工具开发全记录(十九):嵌入资源处理

1.前言 &#x1f4dd; 在上一篇文章中&#xff0c;我们完成了书签的导入导出功能。本篇文章我们研究如何处理嵌入资源&#xff0c;方便后续将资源打包到一个可执行文件中。 2.embed介绍 &#x1f3af; Go 1.16 引入了革命性的 embed 包&#xff0c;彻底改变了静态资源管理的…...

vulnyx Blogger writeup

信息收集 arp-scan nmap 获取userFlag 上web看看 一个默认的页面&#xff0c;gobuster扫一下目录 可以看到扫出的目录中得到了一个有价值的目录/wordpress&#xff0c;说明目标所使用的cms是wordpress&#xff0c;访问http://192.168.43.213/wordpress/然后查看源码能看到 这…...

Python 实现 Web 静态服务器(HTTP 协议)

目录 一、在本地启动 HTTP 服务器1. Windows 下安装 node.js1&#xff09;下载安装包2&#xff09;配置环境变量3&#xff09;安装镜像4&#xff09;node.js 的常用命令 2. 安装 http-server 服务3. 使用 http-server 开启服务1&#xff09;使用 http-server2&#xff09;详解 …...

探索Selenium:自动化测试的神奇钥匙

目录 一、Selenium 是什么1.1 定义与概念1.2 发展历程1.3 功能概述 二、Selenium 工作原理剖析2.1 架构组成2.2 工作流程2.3 通信机制 三、Selenium 的优势3.1 跨浏览器与平台支持3.2 丰富的语言支持3.3 强大的社区支持 四、Selenium 的应用场景4.1 Web 应用自动化测试4.2 数据…...

Java详解LeetCode 热题 100(26):LeetCode 142. 环形链表 II(Linked List Cycle II)详解

文章目录 1. 题目描述1.1 链表节点定义 2. 理解题目2.1 问题可视化2.2 核心挑战 3. 解法一&#xff1a;HashSet 标记访问法3.1 算法思路3.2 Java代码实现3.3 详细执行过程演示3.4 执行结果示例3.5 复杂度分析3.6 优缺点分析 4. 解法二&#xff1a;Floyd 快慢指针法&#xff08;…...