标签:red hat 7.2 rpm安装mysql 5.7.11
查看是否安装了mysql
rpm -qa | grep mysql
卸载mysql
rpm -e –nodeps
解压mysql
tar -xvf mysql-5.7.11-1.el7.x86_64.rpm-bundle.tar
安装mysql
yum install mysql-community-{client,common,libs}-*
rpm -ivh mysql-community-server-5.7.11-1.el7.x86_64.rpm
启动Mysql服务
systemctl start mysqld.service
生成随机密码
grep ‘temporary password‘ /var/log/mysqld.log
2016-03-15T11:25:13.632616Z 1 [Note] A temporary password is generated for root@localhost: X9.L=p4iylZD
查看MySQL服务器的状态
sudo service mysqld status
配置随机密码
mysql -uroot -p
X9.L=p4iylZD
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘HanZheng.123‘;
重新登陆
mysql -uroot -p
HanZheng.123
本文出自 “为梦想奋斗” 博客,谢绝转载!
标签:red hat 7.2 rpm安装mysql 5.7.11
原文地址:http://hanzheng.blog.51cto.com/3080616/1751471