Centos7安装mysql8.0


1.安装以wget工具

yum install wget 

2.下载官方的rpm包(官方地址)

wget https://repo.mysql.com//mysql80-community-release-el7-4.noarch.rpm

3.安装本地rpm包

yum -y install mysql80-community-release-el7-4.noarch.rpm

4.安装mysql服务

yum install mysql-community-server

5.启动mysql服务

service mysqld start

6.查看mysql状态

service mysqld status

7.查看mysql初始密码

grep 'temporary password' /var/log/mysqld.log

8.将mysql加入开机自启

systemctl enable mysqld.service
Was this helpful?

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.