1、下载rpm
wget https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-8.0-community-el7-x86_64/mysql80-community-release-el7-6.noarch.rpm
2、安装yum源
yum localinstall -y mysql80-community-release-el7-6.noarch.rpm
3、安装mysql
yum install -y mysql-community-server --nogpgcheck
在/etc/my.cnf添加一下参数以提高性能
default-time-zone='+8:00'
max_connections=1000
character_set_server=utf8
lower_case_table_names=1
default-storage-engine=INNODB
innodb_file_per_table=true
tmp_table_size=512M
innodb_buffer_pool_size=4096M
4、启动mysql
systemctl restart mysqld