标签:temporary 登陆 mirror led 自己 rom 安装 sys sql
查是否安装了mysql:
centos6:
rpm -qa |grep mysql
centos7:
rpm -qa|grep mariadb
或rpm -qa |grep mysql
有老的版本可以执行命令卸载:
rpm -e --nodeps mysql-libs
1、
cat > /etc/yum.repos.d/mysql-community-el7.repo<<‘EOF‘
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://mirror.tuna.tsinghua.edu.cn/mysql/yum/mysql57-community-el7/
enabled=1
gpgcheck=0
EOF
2.
yum install mysql-community-server -y
systemctl restart mysqld
# mysqld.log中查询密码
grep password /var/log/mysqld.log
2019-04-09T07:28:44.292450Z 1 [Note] A temporary password is generated for root@localhost: wg:V45ci4ljpz!r
3.改/etc/my.cnf
4.重启
#登陆后修改成自己的密码:
mysql> alter user user() identified by ‘test123456‘;
5、 查看授权情况
select user,host from mysql.user;
标签:temporary 登陆 mirror led 自己 rom 安装 sys sql
原文地址:https://www.cnblogs.com/hongfeng2019/p/11785612.html