2.选择机器配置为:2核 4G内存 3M带宽 40G云盘 centOS7.9 64位(这个配置刚好吃满优惠)
3.将要安装的版本是MySQL8.0.31
4.到MySQL官网下载, 版本为Community版本,对应操作系统是RedHat,操作系统版本是Linux7 X86
6.下载完成后,解压,并使用xshell将需要的传入服务器中(也可以不选,全都要),存放位置/root
7.安装mysql之前,先检查是否有mariadb,如果有先卸载
rpm -qa|grep mariadb
8.忽略依赖强制卸载
rpm -e --nodeps mariadb-libs
9.rpm 包的安装顺序是:
mysql-community-common
mysql-community-client-plugins
mysql-community-libs
mysql-community-client
mysql-community-icu-data-files
mysql-community-server
10.在Linux安装MySQL5.7的过程中,执行最后一步
rpm -ivh mysql-community-server-8.0.30-1.el7.x86_64.rpm
报错
error: Failed dependencies:
libaio.so.1()(64bit) is needed by mysql-community-server-8.0.30-1.el7.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by mysql-community-server-8.0.30-1.el7.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by mysql-community-server-8.0.30-1.el7.x86_64
mysql-community-icu-data-files = 8.0.30-1.el7 is needed by mysql-community-server-8.0.30-1.el7.x86_64
解决
直接使用 yum 命令在线下载:
yum install libaio
11.安装好后,使用以下命令初始化
mysqld --initialize --console
12.修改安装目录的所有者和所属组,让mysql有权使用操作系统
chown -R mysql:mysql /var/lib/mysql/
13.启动服务
systemctl start mysqld
14.使用管道查看临时密码
cat /var/log/mysqld.log|grep localhost
15.获取临时密码后,使用以下命令登录mysql
mysql -uroot -p
16.修改mysql临时密码
alter user 'root'@'localhost' identified by '123456';
17.mysql配置完成!
标签:30,community,server,阿里,64,mysql,上传,el7 From: https://www.cnblogs.com/yuhaozhe/p/17326808.html