一、源码编译

    https://support.huaweicloud.com/prtg-kunpengdbs/kunpengmysql8017euler_02_0014.html

 

二、rpm 包安装

0.安装环境配置

   a.创建用户组和用户

      创建mysql用户组。

      groupadd mysql

  创建mysql用户

       useradd -g mysql mysql

   b.创建数据目录

    mkdir /data

      mkdir -p /data/mysql

      cd /data/mysql

      mkdir data tmp run log

1.下载mysql8.0.23安装包

    wget https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.22-1.el8.aarch64.rpm-bundle.tar

2.解压

   tar vxf mysql-8.0.22-1.el8.aarch64.rpm-bundle.tar

   arm下centos8 安装mysql8.0.22

 3.安装rpm包(注意包的安装顺序)

   rpm -ivh mysql-community-common-8.0.22-1.el8.aarch64.rpm

   rpm -ivh mysql-community-client-plugins-8.0.22-1.el8.aarch64.rpm

   rpm -ivh  mysql-community-libs-8.0.22-1.el8.aarch64.rpm

   rpm -ivh mysql-community-client-8.0.22-1.el8.aarch64.rpm

   rpm -ivh mysql-community-server-8.0.22-1.el8.aarch64.rpm

4.运行

   官网rpm安装方式的软件默认安装目录为 “/usr”

   (1)修改my.cnf 文件

      vim /etc/my.cnf

     arm下centos8 安装mysql8.0.22

  (2)修改配置文件my.cnf的用户组和用户权限为 mysql:mysql

     chown mysql:mysql /etc/my.cnf

  (3)初始化数据库

     mysqld --defaults-file=/etc/my.cnf --initialize

     arm下centos8 安装mysql8.0.22

 (4)启动数据库

    mysqld --defaults-file=/etc/my.cnf

   arm下centos8 安装mysql8.0.22

 (5)登录数据库

    mysql -uroot -p -S /data/mysql/run/mysql.sock

    arm下centos8 安装mysql8.0.22

 (6)配置数据库和密码

    a.登录数据库以后,修改通过root用户登录数据库的密码

       alter user 'root'@'localhost' identified by "123456";

    b.创建全域root用户(允许root从其他服务器访问)

       create user 'root'@'%' identified by '123456';

    c.进行授权

      grant all privileges on *.* to 'root'@'%';

      flush privileges;

   

相关文章:

  • 2021-11-21
  • 2022-02-01
  • 2021-11-24
  • 2022-12-23
  • 2021-10-01
  • 2021-06-17
  • 2022-01-29
  • 2021-07-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-03-30
  • 2021-11-11
  • 2022-12-23
  • 2021-11-30
相关资源
相似解决方案