使用ROS创建ECS,安装MySQL并生成用户

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介: 在杭州创建自建数据库网络和服务器环境,部署一台ECS,安装MySQL并创建root用户,三个普通用户并分配权限,创建数据库插入测试数据。ros模板 { "ROSTemplateFormatVersion": "2015-09-01", "Description": "部署自建数据库网络和服.

在杭州创建自建数据库网络和服务器环境,部署一台ECS,安装MySQL并创建root用户,三个普通用户并分配权限,创建数据库插入测试数据。
ros模板

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Description": "部署自建数据库网络和服务器环境",
  "Metadata": {
    "ALIYUN::ROS::Interface": {
      "ParameterGroups": [
        {
          "Parameters": [
            "CidrBlock",
            "VpcName",
            "Vsw_ZoneId",
            "VSWName"
          ],
          "Label": {
            "default": "网络"
          }
        },
        {
          "Parameters": [
            "ECSZoneId",
            "InstanceType",
            "LoginPassword",
            "ImageId",
            "SystemDiskCategory",
            "SystemDiskSize",
            "PublicIP",
            "InternetChargeType",
            "InternetMaxBandwidthIn",
            "HostName",
            "InstanceName"
          ],
          "Label": {
            "default": "ECS"
          }
        },
        {
          "Parameters": [
            "MysqlPassword",
            "DataBase1",
            "User1",
            "Password1",
            "User2",
            "Password2",
            "User3",
            "Password3",
            "DBTable"
          ],
          "Label": {
            "default": "MySQL"
          }
        }
      ],
      "TemplateTags": [
        "VPC_ECS"
      ]
    }
  },
  "Parameters": {
    "User2": {
      "Type": "String",
      "Description": "创建MySQL普通用户",
      "Label": "用户2",
      "Default": "doman"
    },
    "DBTable": {
      "Type": "String",
      "Description": "数据库内创建表",
      "Label": "表名",
      "Default": "demo_dplus_buyer"
    },
    "SystemDiskSize": {
      "Type": "Number",
      "Description": "系统盘大小,40 - 500, 单位:GB",
      "Label": "系统盘",
      "Default": 40
    },
    "PublicIP": {
      "Type": "Boolean",
      "Description": "是否分配公网IP",
      "AllowedValues": [
        true,
        false
      ],
      "Label": "分配公网IP",
      "Default": true
    },
    "Vsw_ZoneId": {
      "Type": "String",
      "Description": "可用区是指在同一地域内,电力和网络互相独立的物理区域。在同一专有网络内可用区与可用区之间内网互通,可用区之间能做到故障隔离。。",
      "AllowedValues": [
        "cn-hangzhou-b",
        "cn-hangzhou-d",
        "cn-hangzhou-e",
        "cn-hangzhou-f",
        "cn-hangzhou-g",
        "cn-hangzhou-h",
        "cn-hangzhou-i"
      ],
      "Label": "可用区",
      "Default": "cn-hangzhou-b"
    },
    "User1": {
      "Type": "String",
      "Description": "创建MySQL普通用户",
      "Label": "用户1",
      "Default": "selman"
    },
    "Password3": {
      "Type": "String",
      "Description": "普通用户密码",
      "Label": "用户3密码",
      "MinLength": 6,
      "MaxLength": 30,
      "Default": "yourpassword"
    },
    "Password2": {
      "Type": "String",
      "Description": "普通用户密码",
      "Label": "用户2密码",
      "MinLength": 6,
      "MaxLength": 30,
      "Default": "yourpassword"
    },
    "Password1": {
      "Type": "String",
      "Description": "普通用户密码",
      "Label": "用户1密码",
      "MinLength": 6,
      "MaxLength": 30,
      "Default": "yourpassword"
    },
    "CidrBlock": {
      "Type": "String",
      "Description": "建议您使用RFC私网地址10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 作为专有网络的网段。如果特殊情况需要使用公网网段作为专有网络网段,请提交工单申请。",
      "Label": "IPv4网段",
      "Default": "192.168.0.0/16"
    },
    "User3": {
      "Type": "String",
      "Description": "创建MySQL普通用户",
      "Label": "用户3",
      "Default": "alterman"
    },
    "VSWName": {
      "Type": "String",
      "Description": "长度为2-128个字符,以大小字母或中文开头,可包含数字,_或-。",
      "Label": "VSwitch名称",
      "Default": "vsw_local"
    },
    "InternetChargeType": {
      "Type": "String",
      "Description": "PayByBandwidth(按固定带宽计费)、PayByTraffic(按流量计费)。",
      "AllowedValues": [
        "PayByBandwidth",
        "PayByTraffic"
      ],
      "Label": "公网带宽计费",
      "Default": "PayByTraffic"
    },
    "SystemDiskCategory": {
      "Type": "String",
      "Description": "指定系统盘类型。",
      "AllowedValues": [
        "cloud",
        "cloud_efficiency",
        "cloud_ssd",
        "ephemeral_ssd"
      ],
      "Label": "系统盘类型",
      "Default": "cloud_efficiency"
    },
    "InstanceName": {
      "Type": "String",
      "Description": "最长128个字符,可包含英文、中文、数字、下划线(_)、点(.)、连字符(-)。",
      "Label": "实例名称",
      "Default": "dbserver"
    },
    "InternetMaxBandwidthIn": {
      "Type": "Number",
      "Description": "取值范围:[1, 100],单位:Mbps。",
      "Label": "公网最大入网带宽",
      "Default": 5
    },
    "ECSZoneId": {
      "Type": "String",
      "Description": "可用区是指在同一地域内,电力和网络互相独立的物理区域。在同一专有网络内可用区与可用区之间内网互通,可用区之间能做到故障隔离。",
      "AllowedValues": [
        "cn-hangzhou-b",
        "cn-hangzhou-d",
        "cn-hangzhou-e",
        "cn-hangzhou-f",
        "cn-hangzhou-g",
        "cn-hangzhou-h",
        "cn-hangzhou-i"
      ],
      "Label": "可用区",
      "Default": "cn-hangzhou-b"
    },
    "MysqlPassword": {
      "Type": "String",
      "Description": "MySQLroot用户密码",
      "Label": "root用户密码",
      "MinLength": 6,
      "MaxLength": 30,
      "Default": "Test123"
    },
    "ImageId": {
      "Type": "String",
      "Description": "镜像ID, 表示要启动一个ECS实例的映像资源, <a href='#/product/cn-hangzhou/list/imageList' target='_blank'>查看镜像资源</a>",
      "Label": "ECS镜像ID",
      "Default": "centos_7"
    },
    "VpcName": {
      "Type": "String",
      "Description": "长度为2-128个字符,以大小字母或中文开头,可包含数字,_或-。",
      "Label": "Vpc名称",
      "Default": "VPC_LOCAL"
    },
    "InstanceType": {
      "Type": "String",
      "Description": "ECS实例类型, <a href='#/product/cn-hangzhou/list/typeList' target='_blank'>查看实例类型</a>",
      "AllowedValues": [
        "ecs.e3.medium",
        "ecs.g5.xlarge",
        "ecs.g6.xlarge",
        "ecs.t5-c1m4.xlarge",
        "ecs.sn2ne.xlarge"
      ],
      "Label": "ECS实例类型",
      "Default": "ecs.e3.medium"
    },
    "HostName": {
      "Type": "String",
      "Description": "最少 2 个字符,点(.)和连字符(-)不能作为 hostname 的首尾字符,且不能连续使用。",
      "Label": "主机名",
      "Default": "dbserver"
    },
    "DataBase1": {
      "Type": "String",
      "Description": "创建一个指定数据库",
      "Label": "数据库",
      "Default": "demodb"
    },
    "LoginPassword": {
      "NoEcho": true,
      "Type": "String",
      "Description": "ECS登录密码",
      "Label": "ECS登录密码",
      "Confirm": true,
      "MinLength": 6,
      "MaxLength": 30
    }
  },
  "Resources": {
    "WaitCondition": {
      "Type": "ALIYUN::ROS::WaitCondition",
      "Properties": {
        "Timeout": 600,
        "Count": 1,
        "Handle": {
          "Ref": "WaitConditionHandle"
        }
      }
    },
    "ECS": {
      "Type": "ALIYUN::ECS::Instance",
      "Properties": {
        "IoOptimized": "optimized",
        "PrivateIpAddress": "192.168.0.1",
        "ZoneId": {
          "Ref": "ECSZoneId"
        },
        "UserData": {
          "Fn::Replace": [
            {
              "ros-notify": {
                "Fn::GetAtt": [
                  "WaitConditionHandle",
                  "CurlCli"
                ]
              }
            },
            {
              "Fn::Join": [
                "",
                [
                  "#!/bin/sh \n",
                  "rootpwd=",
                  {
                    "Ref": "MysqlPassword"
                  },
                  " \n",
                  "data_base1=",
                  {
                    "Ref": "DataBase1"
                  },
                  " \n",
                  "user1=",
                  {
                    "Ref": "User1"
                  },
                  " \n",
                  "pwd1=",
                  {
                    "Ref": "Password1"
                  },
                  " \n",
                  "user2=",
                  {
                    "Ref": "User2"
                  },
                  " \n",
                  "pwd2=",
                  {
                    "Ref": "Password2"
                  },
                  " \n",
                  "user3=",
                  {
                    "Ref": "User3"
                  },
                  " \n",
                  "pwd3=",
                  {
                    "Ref": "Password3"
                  },
                  " \n",
                  "db_table=",
                  {
                    "Ref": "DBTable"
                  },
                  " \n",
                  "cd ~ \n",
                  "wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm \n",
                  "rpm -ivh mysql-community-release-el6-5.noarch.rpm \n",
                  "yum repolist all | grep mysql \n",
                  "yum install mysql-community-server -y \n",
                  "# 生成MySQL root用户,设置密码 \n",
                  "echo \\#\\!/bin/bash > dbroot.sh \n",
                  "echo MYSQL_PASSWD=\\\"$rootpwd\\\" >> dbroot.sh \n",
                  "echo service mysqld start >> dbroot.sh \n",
                  "echo yum install expect -y >> dbroot.sh \n",
                  "echo \"echo '#!/usr/bin/expect\" >> dbroot.sh \n",
                  "echo set timeout 60 >> dbroot.sh \n",
                  "echo 'set password [lindex $argv 0]' >> dbroot.sh \n",
                  "echo spawn mysql_secure_installation >> dbroot.sh \n",
                  "echo expect { >> dbroot.sh \n",
                  "echo \\\"enter for none\\\" { send \\\"\\\\r\\\"\\; exp_continue} >> dbroot.sh \n",
                  "echo \\\"Y/n\\\" { send \\\"Y\\\\r\\\" \\; exp_continue} >> dbroot.sh \n",
                  "echo '\"password\" { send \"$password\\r\"; exp_continue}' >> dbroot.sh \n",
                  "echo \\\"Cleaning up\\\" { send \\\"\\\\r\\\"} >> dbroot.sh \n",
                  "echo } >> dbroot.sh \n",
                  "echo \"interact ' > mysql_secure_installation.exp\" >> dbroot.sh \n",
                  "echo chmod +x mysql_secure_installation.exp >> dbroot.sh \n",
                  "echo './mysql_secure_installation.exp $MYSQL_PASSWD' >> dbroot.sh \n",
                  "chmod +x dbroot.sh \n",
                  "./dbroot.sh \n",
                  "# 数据库配置文件初始化命令 \n",
                  "cp /etc/my.cnf /etc/my.cnf.bak \n",
                  "echo '[mysqld]' > /etc/my.cnf \n",
                  "echo 'server_id=10001' >> /etc/my.cnf \n",
                  "echo 'innodb_buffer_pool_size         = 8G' >> /etc/my.cnf \n",
                  "echo 'port  = 3306' >> /etc/my.cnf \n",
                  "echo 'max_connections         = 1000 ' >> /etc/my.cnf \n",
                  "echo 'max_user_connections    = 1000 ' >> /etc/my.cnf \n",
                  "echo 'table_open_cache            = 10240 ' >> /etc/my.cnf \n",
                  "echo 'table_definition_cache      = 2048  ' >> /etc/my.cnf \n",
                  "echo 'open_files_limit = 65535 ' >> /etc/my.cnf \n",
                  "echo 'innodb_open_files               = 65535' >> /etc/my.cnf \n",
                  "echo 'innodb_log_file_size            = 100M ' >> /etc/my.cnf \n",
                  "echo 'innodb_log_files_in_group       = 2 ' >> /etc/my.cnf \n",
                  "echo 'lower_case_table_names  = 1' >> /etc/my.cnf \n",
                  "echo 'collation_server        = utf8_bin' >> /etc/my.cnf \n",
                  "echo 'character_set_server = utf8' >> /etc/my.cnf \n",
                  "echo 'skip_name_resolve' >> /etc/my.cnf \n",
                  "echo 'skip-external-locking' >> /etc/my.cnf \n",
                  "echo 'explicit_defaults_for_timestamp ' >> /etc/my.cnf \n",
                  "echo 'back_log        = 1024' >> /etc/my.cnf \n",
                  "echo 'thread_cache_size           = 512 ' >> /etc/my.cnf \n",
                  "echo 'max_connect_errors      = 2000 ' >> /etc/my.cnf \n",
                  "echo 'table_open_cache_instances  = 16' >> /etc/my.cnf \n",
                  "echo 'binlog_cache_size           = 512K' >> /etc/my.cnf \n",
                  "echo 'bulk_insert_buffer_size     = 64M' >> /etc/my.cnf \n",
                  "echo 'ft_min_word_len             = 4' >> /etc/my.cnf \n",
                  "echo 'key_buffer_size             = 32M' >> /etc/my.cnf \n",
                  "echo 'max_allowed_packet          = 1024M' >> /etc/my.cnf \n",
                  "echo 'max_heap_table_size         = 32M' >> /etc/my.cnf \n",
                  "echo 'tmp_table_size  = 32M' >> /etc/my.cnf \n",
                  "echo 'myisam_max_sort_file_size   = 10G' >> /etc/my.cnf \n",
                  "echo 'myisam_repair_threads       = 1' >> /etc/my.cnf \n",
                  "echo 'myisam_sort_buffer_size     = 24M' >> /etc/my.cnf \n",
                  "echo 'query_cache_limit           = 1M' >> /etc/my.cnf \n",
                  "echo 'query_cache_size            = 0' >> /etc/my.cnf \n",
                  "echo 'sort_buffer_size            = 4M' >> /etc/my.cnf \n",
                  "echo 'join_buffer_size            = 6M' >> /etc/my.cnf \n",
                  "echo 'read_buffer_size            = 2M' >> /etc/my.cnf \n",
                  "echo 'read_rnd_buffer_size        = 3M' >> /etc/my.cnf \n",
                  "echo 'thread_stack                = 192K' >> /etc/my.cnf \n",
                  "echo '# log' >> /etc/my.cnf \n",
                  "echo 'general_log                 = off ' >> /etc/my.cnf \n",
                  "echo 'log_bin=on' >> /etc/my.cnf \n",
                  "echo 'binlog_format=ROW' >> /etc/my.cnf \n",
                  "echo '#' >> /etc/my.cnf \n",
                  "echo 'datadir=/var/lib/mysql' >> /etc/my.cnf \n",
                  "echo 'socket=/var/lib/mysql/mysql.sock' >> /etc/my.cnf \n",
                  "echo '' >> /etc/my.cnf \n",
                  "echo 'symbolic-links=0' >> /etc/my.cnf \n",
                  "echo '' >> /etc/my.cnf \n",
                  "echo 'sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES' >> /etc/my.cnf \n",
                  "echo '' >> /etc/my.cnf \n",
                  "echo '[mysql_safe]' >> /etc/my.cnf \n",
                  "echo 'log-error=/var/log/mysqld.log' >> /etc/my.cnf \n",
                  "echo 'pid-file=/var/run/mysqld/mysqld.pid' >> /etc/my.cnf \n",
                  "service mysqld restart \n",
                  "# 操作系统层面数据库优化 \n",
                  "echo 'ulimit -u 65535' >> /etc/profile \n",
                  "echo 'ulimit -n 65535' >> /etc/profile \n",
                  "echo 'ulimit -d unlimited' >> /etc/profile \n",
                  "echo 'ulimit -m unlimited' >> /etc/profile \n",
                  "echo 'ulimit -s unlimited' >> /etc/profile \n",
                  "echo 'ulimit -t unlimited' >> /etc/profile \n",
                  "echo 'ulimit -v unlimited' >> /etc/profile \n",
                  "source /etc/profile \n",
                  "# 创建数据库、表,插入数据 \n",
                  "echo \\#\\!/bin/bash > db.sh \n",
                  "echo mysql -uroot -p\"$rootpwd\" \\<\\<EOF >> db.sh \n",
                  "echo CREATE DATABASE IF NOT EXISTS \"$data_base1\" DEFAULT CHARSET utf8 COLLATE utf8_general_ci\\; >> db.sh \n",
                  "echo create user \"$user1\" identified by \\\"$pwd1\\\"\\; >> db.sh \n",
                  "echo grant select on $data_base1.* to \\\"$user1\\\"@\\\"%\\\" identified by \\\"$pwd1\\\"\\; >> db.sh \n",
                  "echo create user \"$user2\" identified by \\\"$pwd2\\\"\\; >> db.sh \n",
                  "echo grant select,update,insert,delete on \"$data_base1\".* to \"$user2\"@\\\"%\\\" identified by \\\"$pwd2\\\"\\; >> db.sh \n",
                  "echo create user \"$user3\" identified by \\\"$pwd3\\\"\\; >> db.sh \n",
                  "echo grant create,drop,index,alter on \"$data_base1\".* to \\\"$user3\\\"@\\\"%\\\" identified by \\\"$pwd3\\\"\\; >> db.sh \n",
                  "echo flush privileges\\; >> db.sh \n",
                  "echo use \"$data_base1\"\\; >> db.sh \n",
                  "echo DROP TABLE IF EXISTS demo_data\\; >> db.sh \n",
                  "echo CREATE TABLE \"$db_table\" \\( >> db.sh \n",
                  "echo   buyer_id varchar\\(32\\) DEFAULT NULL , >> db.sh \n",
                  "echo   buyer_prov varchar\\(32\\) DEFAULT NULL , >> db.sh \n",
                  "echo   gender varchar\\(32\\) DEFAULT NULL , >> db.sh \n",
                  "echo   age_range varchar\\(32\\) DEFAULT NULL , >> db.sh \n",
                  "echo   zodiac varchar\\(32\\) DEFAULT NULL  >> db.sh \n",
                  "echo \\) ENGINE=InnoDB DEFAULT CHARSET=utf8\\; >> db.sh \n",
                  "echo insert into \"$db_table\"\\(\"buyer_id\",\"buyer_prov\",\"gender\",\"age_range\",\"zodiac\"\\) values >> db.sh \n",
                  "echo \\(\\\"111111111\\\",\\\"asdasd\\\",\\\"M\\\",\\\"20-30\\\",\\\"by\\\"\\), >> db.sh \n",
                  "echo \\(\\\"22222222\\\",\\\"zxczxc\\\",\\\"M\\\",\\\"20-30\\\",\\\"by\\\"\\)\\; >> db.sh \n",
                  "echo EOF >> db.sh \n",
                  "chmod +x db.sh \n",
                  "./db.sh \n",
                  "ros-notify -d \"{\\\"Data\\\" : \\\"SUCCESS\\\", \\\"Status\\\" : \\\"SUCCESS\\\"}\" \n"
                ]
              ]
            }
          ]
        },
        "SystemDiskSize": {
          "Ref": "SystemDiskSize"
        },
        "VSwitchId": {
          "Ref": "VSW"
        },
        "SecurityGroupId": {
          "Ref": "SG"
        },
        "SystemDiskCategory": {
          "Ref": "SystemDiskCategory"
        },
        "InternetChargeType": {
          "Ref": "InternetChargeType"
        },
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "VpcId": {
          "Ref": "VPC"
        },
        "InternetMaxBandwidthIn": {
          "Ref": "InternetMaxBandwidthIn"
        },
        "ImageId": {
          "Ref": "ImageId"
        },
        "InstanceType": {
          "Ref": "InstanceType"
        },
        "AllocatePublicIP": {
          "Ref": "PublicIP"
        },
        "HostName": {
          "Ref": "HostName"
        },
        "Password": {
          "Ref": "LoginPassword"
        }
      }
    },
    "SG": {
      "Type": "ALIYUN::ECS::SecurityGroup",
      "Properties": {
        "VpcId": {
          "Ref": "VPC"
        },
        "SecurityGroupName": "mysg",
        "SecurityGroupIngress": [
          {
            "PortRange": "-1/-1",
            "Priority": 1,
            "SourceCidrIp": "0.0.0.0/0",
            "IpProtocol": "all",
            "NicType": "internet"
          }
        ],
        "SecurityGroupEgress": [
          {
            "PortRange": "-1/-1",
            "Priority": 1,
            "IpProtocol": "all",
            "DestCidrIp": "0.0.0.0/0",
            "NicType": "intranet"
          }
        ]
      }
    },
    "WaitConditionHandle": {
      "Type": "ALIYUN::ROS::WaitConditionHandle"
    },
    "VPC": {
      "Type": "ALIYUN::ECS::VPC",
      "Properties": {
        "CidrBlock": {
          "Ref": "CidrBlock"
        },
        "VpcName": {
          "Ref": "VpcName"
        }
      }
    },
    "VSW": {
      "Type": "ALIYUN::ECS::VSwitch",
      "Properties": {
        "VpcId": {
          "Ref": "VPC"
        },
        "ZoneId": {
          "Ref": "Vsw_ZoneId"
        },
        "CidrBlock": {
          "Ref": "CidrBlock"
        },
        "VSwitchName": {
          "Ref": "VSWName"
        }
      }
    }
  },
  "Outputs": {
    "ECS实例ID": {
      "Value": {
        "Fn::GetAtt": [
          "ECS",
          "InstanceId"
        ]
      }
    },
    "公网IP": {
      "Value": {
        "Fn::GetAtt": [
          "ECS",
          "PublicIp"
        ]
      }
    }
  }
}

参考阿里云解决方案详情

相关实践学习
借助OSS搭建在线教育视频课程分享网站
本教程介绍如何基于云服务器ECS和对象存储OSS,搭建一个在线教育视频课程分享网站。
7天玩转云服务器
云服务器ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,可降低 IT 成本,提升运维效率。本课程手把手带你了解ECS、掌握基本操作、动手实操快照管理、镜像管理等。了解产品详情:&nbsp;https://www.aliyun.com/product/ecs
目录
相关文章
|
2月前
|
安全 关系型数据库 MySQL
Linux(CentOS6)安装MySQL5.6
Linux(CentOS 6)系统上安装MySQL 5.6版本的详细步骤,包括准备数据存放目录、创建用户、下载安装包、初始化数据库、配置服务脚本、设置环境变量等操作。
142 1
|
15天前
|
存储 SQL 关系型数据库
MySQL的安装&数据库的简单操作
本文介绍了数据库的基本概念及MySQL的安装配置。首先解释了数据库、数据库管理系统和SQL的概念,接着详细描述了MySQL的安装步骤及其全局配置文件my.ini的调整方法。文章还介绍了如何启动MySQL服务,包括配置环境变量和使用命令行的方法。最后,详细说明了数据库的各种操作,如创建、选择和删除数据库的SQL语句,并提供了实际操作示例。
58 13
MySQL的安装&数据库的简单操作
|
8天前
|
关系型数据库 MySQL Linux
Linux 安装 mysql 【使用 tar.gz | tar.xz安装包-离线安装】
在Linux系统中使用tar.xz压缩包安装MySQL数据库的详细步骤。包括下载MySQL压缩包,解压到指定目录,创建mysql用户和组,设置目录权限,初始化MySQL,配置my.cnf文件,启动服务,以及修改root用户密码。此外,还提供了如何设置Windows远程登录MySQL服务器的方法。
Linux 安装 mysql 【使用 tar.gz | tar.xz安装包-离线安装】
|
5天前
|
数据采集 中间件 关系型数据库
Mac系统通过brew安装mysql5.7后,启动报错的解决办法
Mac系统通过brew安装mysql5.7后,启动报错的解决办法
16 2
|
8天前
|
关系型数据库 MySQL Linux
Linux 安装 mysql【使用yum源进行安装】
这篇文章介绍了在Linux系统中使用yum源安装MySQL数据库的步骤,包括配置yum源、安装MySQL服务、启动服务以及修改root用户的默认密码。
Linux 安装 mysql【使用yum源进行安装】
|
2月前
|
弹性计算 关系型数据库 MySQL
centos7 mysql安装及配置
本文详细介绍了在阿里云服务器ECS上通过yum源安装MySQL 8.0.12的过程,包括更新yum源、下载并安装MySQL源、解决安装过程中可能遇到的问题等步骤。此外,还介绍了如何启动MySQL服务、设置开机自启、配置登录密码、添加远程登录用户以及处理远程连接异常等问题。适合初学者参考,帮助快速搭建MySQL环境。
158 8
centos7 mysql安装及配置
|
1月前
|
NoSQL 关系型数据库 Redis
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
mall在linux环境下的部署(基于Docker容器),docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongodb、minio详细教程,拉取镜像、运行容器
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
|
2月前
|
关系型数据库 MySQL Linux
在Linux中,新安装mysql后怎样提升mysql的安全级别?
在Linux中,新安装mysql后怎样提升mysql的安全级别?
|
2月前
|
Ubuntu Shell C++
在Ubuntu18.04上安装ros2的环境,ros2的常用命令:播放包、录制包等
在Ubuntu18.04上安装ros2的环境,ros2的常用命令:播放包、录制包等
43 1
|
2月前
|
关系型数据库 MySQL Shell
MySQL数据库一键安装脚本,适合任何版本
MySQL数据库一键安装脚本,适合任何版本
38 2

推荐镜像

更多
下一篇
无影云桌面