centos 安装mysql
1、下载对应rpm包
wget https://dev.mysql.com/get/mysql80-community-release-el6-1.noarch.rpm
2、.安装用来配置mysql的yum源的rpm包
rpm -Uvh mysql57-community-release-el6-9.noarch.rpm
3、安装
yum install mysql-community-server
不起作用时:yum install mysql-server
4、开启mysql 服务
service mysqld start
5、查看超级用户root密码
grep 'temporary password' /var/log/mysqld.log
6、修改密码
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';