MySQL安装之yum安装

之前安装nginx体会到了yum的强大,所以安装mysql考虑使用yum安装试下

1. 下载并安装MySQL官方的 Yum Repository

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

yum -y install mysql57-community-release-el7-10.noarch.rpm

yum -y install mysql-community-server

 

相比之前的编译安装真的简单了很多啊有木有

启动mysql

systemctl start  mysqld.service

mysql配置文件 /etc/my.cnf

data目录 /var/lib/mysql

 

grep “password” /var/log/mysqld.log   查看初始密码

 

但此时还有一个问题,就是因为安装了Yum Repository,以后每次yum操作都会自动更新,需要把这个卸载掉:

yum -y remove mysql57-community-release-el7-10.noarch

About sun 83 Articles
85后青年,自诩为伪文艺青年

Be the first to comment

Leave a Reply

Your email address will not be published.


*