1.先去官网准备好几个安装包:
2.tar -xvf mysql-8.0.26-1.el8.x86_64.rpm-bundle.tar
3.可能需要卸载系统中自带的mariadb
rpm -qa|grep mariadb
rpm -e --nodeps mariadb-connector-c-3.1.11-2.oc8.1.x86_64
rpm -e --nodeps mariadb-connector-c-config-3.1.11-2.oc8.1.noarch
4.rpm -ivh mysql-community-common-8.0.26-1.el8.x86_64.rpm
5.rpm -ivh mysql-community-client-plugins-8.0.26-1.el8.x86_64.rpm
6.rpm -ivh mysql-community-libs-8.0.26-1.el8.x86_64.rpm
7.rpm -ivh mysql-community-client-8.0.26-1.el8.x86_64.rpm
8.rpm -ivh mysql-community-server-8.0.26-1.el8.x86_64.rpm
9.mysqld --initialize --console
10.chown -R mysql:mysql /var/lib/mysql/
11. systemctl start mysqld
12.cat /var/log/mysqld.log|grep localhost
13.mysql -uroot -p
14.修改密码
alter user 'root'@'localhost' identified by 'amz@2023';
15.use mysql;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'amz@2023';
grant all privileges on *.* to 'root'@'%';
flush privileges;
标签:8.0,26,x86,mysql8,centos7,64,mysql,服务器,rpm From: https://www.cnblogs.com/benjerry/p/17517852.html