在Rancher2.4上部署Alibaba微服务注册和配置管理中心Nacos-Server1.3.2(阿里云-Aliyun杰作),并启用MySQL8数据库存储

今天颓废一下。。。。。。。。。。准备工作:第一步:安装Rancher2.4.5(改天有时间可以整理。。。。。)第二步:安装MySQL8.0.21(改天也可以整理。。。。。。。)1、先创建好Nacos-Server所需要的数据库、表结构等;root登录mysql数据库,创建数据库、用户及赋权,其中192.168.100.%,是Rancher的节点(node)服务器地址段:CREATE DATABASE nacos_config;CREATE USER 'naco...
摘要由CSDN通过智能技术生成

 

今天颓废一下。。。。。。。。。。

 

准备工作:

第一步:安装Rancher2.4.5(改天有时间可以整理。。。。。)

第二步:安装MySQL8.0.21(改天也可以整理。。。。。。。)

 

 1、先创建好Nacos-Server所需要的数据库、表结构等;

 root登录mysql数据库,创建数据库、用户及赋权,其中192.168.100.%,是Rancher的节点(node)服务器地址段:

CREATE DATABASE nacos_config;
CREATE USER 'nacos'@'192.168.100.%' IDENTIFIED WITH mysql_native_password BY 'XXnideYY';
grant all privileges  on nacos_config.* to 'nacos'@'192.168.100.%';
flush privileges;

到Nacos的Github下载对应的数据库脚本来创建表

下载地址:https://github.com/alibaba/nacos/blob/master/config/src/main/resources/META-INF/nacos-db.sql

脚本如下:

/*
 * Copyright 1999-2018 Alibaba Group Holding Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = config_info   */
/******************************************/
CREATE TABLE `config_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) DEFAULT NULL,
  `content` longtext NOT NULL COMMENT 'content',
  `md5` varchar(32) DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COMMENT 'source user',
  `src_ip` varchar(20) DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) DEFAULT NULL,
  `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) DEFAULT NULL,
  `c_use` varchar(64) DEFAULT NULL,
  `effect` varchar(64) DEFAULT NULL,
  `type` varchar(64) DEFAULT NULL,
  `c_schema` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';

/******************************************/
/*   数据库全名 = nacos_config   */
/*   表名称 = c
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值