spring cloud 部署 Centos8 离线环境搭建 一 mysql

  1. 在联网的机器下载到 /opt
    yum install--downloadonly --downloaddir=/opt gcc gcc-c++ automake autoconf libtool make
  2. 安装服务器上传到 /opt 执行安装
    rpm -Uvh *.rpm --nodeps --force
  3. 下载mysql 上传到安装服务器 /opt https://downloads.mysql.com/archives/community/
mkdir -p /opt/mysql
mv mysql-8.3.0-1.el8.aarch64.rpm-bundle.tar /opt/mysql
tar -xf mysql-8.3.0-1.el8.aarch64.rpm-bundle.tar
  1. 逐步执行
cd /opt/mysql
rpm -ivh mysql-community-common-8.3.0-1.el8.x86_64.rpm
rpm -ivh mysql-community-libs-8.3.0-1.el8.x86_64.rpm
rpm -ivh mysql-community-libs-compat-8.3.0-1.el8.x86_64.rpm
rpm -ivh mysql-community-client-8.3.0-1.el8.x86_64.rpm
rpm -ivh mysql-community-server-8.3.0-1.el8.x86_64.rpm

如果出错需要其他工具参考第一步
5. 启动服务
systemctl start mysqld
6. 开机启动
systemctl enable mysqld
7. 查看密码
cat /var/log/mysqld.log | grep password
8. 修改密码

mysql -uroot -p
alter user 'root'@'localhost' identified by 'password';
  1. 开启远程访问
    update user set host = '%' where user = 'root';
posted @ 2024-05-23 13:35  Blog老中医  阅读(10)  评论(0编辑  收藏  举报