rpm -qa|grep mysql
cat /etc/redhat-release
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
yum -y install wget
sudo rpm -Uvh mysql80-community-release-el7-3.noarch.rpm
cd /etc/yum.repos.d/ ll
cd ~ yum repolist enabled | grep "mysql.*-community.*"
yum repolist all | grep mysql
sudo yum install mysql-community-server
[root@localhost ~] sudo yum-config-manager --disable mysql80-community [root@localhost ~] sudo yum-config-manager --enable mysql57-community
systemctl start mysqld.service systemctl status mysqld.service
grep 'temporary password' /var/log/mysqld.log
ALTER USER 'root'@'localhost' IDENTIFIED BY 'myPassword01..';
SHOW VARIABLES LIKE 'character%';
[mysqld] character_set_server=utf8 init-connect='SET NAMES utf8'
systemctl enable mysqld systemctl daemon-reload
systemctl stop mysqld.service
systemctl restart mysqld.service
# firewall防火墙 systemctl status firewalld # 查看转态 firewall-cmd --state # 开启 service firewalld start # 重启 service firewalld restart # 关闭 service firewalld stop #注意分清楚linux的版本 命令会有所不同 #查看防火墙规则 firewall-cmd --list-all