nacos集群部署
本文主要介绍在Centos8 系统中部署 nacos2.2.1集群。 一、环境准备1.1、版本说明 组件 版本 备注 Centos CentOS Linux release 8.4.2105 请自行搜索安装 Nacos 2.2.1 Mysql 8.0.37 请自行搜索安装 openjdk 1.8.0_312-b07 请自行搜索配置 1.2、服务部署规划 主机名 IP 部署端口 路径 说明 Centos8 173.16.4.130 8848 /opt/nacos nacos1 Centos8(2) 173.16.4.131 8848 /opt/nacos nacos2 Centos8(3) 173.16.4.132 8848 /opt/nacos Nacos3 Mac 127.0.0.1 3305 ~ 本人在mac电脑中使用docker部署了mysql,端口为3305 二、部署安装2.1、下载并解压 下载 nacos-server-2.2.1.tar.gz...
zookeeper集群搭建
本文主要讲述如何在 centos8 上搭建 zookeeper 集群。centos8 基础知识自行搜索,本文不过多赘述。 1、准备工作 配置 idk环境,本文为 jdk1.8,下载 SSH 连接工具,本文使用 tabby。准备 三台 服务器,也可以一台,在同时启动三个 zookeeper(伪集群)。本文用三台服务器作为案例,ip 地址分别为 173.16.4.130,173.16.4.131,173.16.4.131。 2、下载 zookeeper并解压1wget https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz 3、解压123tar -zxvf apache-zookeeper-3.8.4-bin.tar.gzz -c /opt/zookeepercd /opt/zookeeper/mv apache-zookeeper-3.8.4-bin apache-zookeeper-3.8.4 4、zookeeper 配置(重要)4.1、进入 conf...
MySQL优化之EXPLAIN命令解析
MySQL优化之EXPLAIN命令解析 转自:https://juejin.cn/post/7073761727850119199 EXPLAIN:查看SQL语句的执行计划 EXPLAIN命令可以帮助我们深入了解MySQL基于开销的优化器,还可以获得很多可能被优化器考虑到的访问策略的细节,以及当运行SQL语句时哪种策略预计会被优化器采用,在优化慢查询时非常有用 执行explain之后结果集包含如下信息: 123+----+-------------+-------+------------+------+---------------+------+---------+------+--------+----------+-------+| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra...
mysql8配置用户权限
1、登录mysql由于我的 mysql8 是由 docker 启动,先通过 docker 命令进入mysql 容器,再使用 mysql 命令登录 mysql。 123456789101112131415161718192021docker exec -it mysql8[容器名称] bashbash-4.4# mysql -u root -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 8Server version: 8.0.36 MySQL Community Server - GPLCopyright (c) 2000, 2024, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their...
