https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.7/mysql-5.7.32-1.sles12.x86_64.rpm-bundle.tar
> rpm -qa|grep mariadb
> rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64
> yum install perl* cpan net-tools libaio -y
rpm 安装顺序为:
common >> libs >> client >> server
> rpm -ivh mysql-community-common-5.7.30-1.el7.x86_64.rpm
> rpm -ivh mysql-community-libs-5.7.30-1.el7.x86_64.rpm
> rpm -ivh mysql-community-client-5.7.30-1.el7.x86_64.rpm
> rpm -ivh mysql-community-server-5.7.30-1.el7.x86_64.rpm
rpm 默认是以mysql用户启动的,mysql的安装目录,数据目录都要保证有足够的权限
> chown mysql:mysql -R /var/log/mysql
> systemctl start mysqld
> cat /var/log/mysqld.log |grep password
xxxxx
需要用到上一步的初始密码
> mysql -uroot -pxxxxx
mysql> alter user 'root'@'localhost' identified by '123456';
mysql> flush privileges;