faeli.me

Centos7 安装 MySQL 8.0

运行安装脚本

#下载安 sh 文件
curl -O https://gist.githubusercontent.com/faeli/4a041caaecc26ef7f245c899e9732754/raw/734cccbb5c60983a5605d884c4e38cda32a88e84/mysql-8.0.15-el7-x86_64-install.sh

#运行 sh
sh mysql-8.0.15-el7-x86_64-install.sh

# 启动服务
sudo systemctl start mysqld
# 查看root密码
cat /var/log/mysqld.log | grep password

2019-03-30T13:54:44.768968Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ,>rhFk4is5y<

#使用密码链接
mysql -uroot -p

脚本说明