赞
踩
rpm -qa | grep mysql
没有安装是什么都没有输出的
yum remove mariadb* -y
rm -rf /etc/my.cnf
rm -rf /var/lib/mysql/
rpm -e mysql // 普通删除模式
rpm -e --nodeps mysql // 强力删除模式
wget https://repo.mysql.com//mysql80-community-release-el7-7.noarch.rpm
sudo rpm -Uvh mysql80-community-release-el7-7.noarch.rpm
yum repolist all |grep enable
yum repolist enabled | grep mysql
yum install mysql-community-server -y
yum -y install mysql-community-server --nogpgcheck
systemctl enable --now mysqld
systemctl status mysqld 可以查看状态
mysql -uroot -p'afe+E+y)G9:!'
设置用户密码策略的安全强度
set global validate_password.policy=LOW;
设置密码长度不少于4
set global validate_password.length=4;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root';
CREATE USER 'root'@'%' IDENTIFIED BY 'Root';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
firewall-cmd --zone=public --list-ports
sudo firewall-cmd --permanent --zone=public --add-port=3306/tcp
sudo firewall-cmd --reload
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。