rpm -qa | grep mariadb
rpm -e mariadb-libs-5.5.56-2.el7.x86_64 --nodeps
rpm -qa | grep mariadb
cd /usr/local/
mkdir mysql
rpm -ivh mysql-community-common-8.0.23-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-libs-8.0.23-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-client-8.0.23-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-server-8.0.23-1.el7.x86_64.rpm --nodeps --force
mysqld --initialize
chown mysql:mysql /var/lib/mysql -R
systemctl start mysqld
systemctl status mysqld
cat /var/log/mysqld.log | grep password
mysql -u root -p
alter user “root”@“localhost” identified by “root”;
exit
mysql -u root -p
create user ‘root’@’%’ identified with mysql_native_password by ‘root’;
grant all privileges on . to ‘root’@’%’ with grant option;
flush privileges;
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘root’ PASSWORD EXPIRE NEVER;
flush privileges;
exit
systemctl stop firewalld.service;
systemctl disable firewalld.service;
systemctl mask firewalld.service;
yum -y install iptables-services
systemctl enable iptables;
systemctl start iptables; vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8090 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3307 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 4369 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 15672 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5672 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8091 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8082 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8083 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 4379 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT
systemctl restart iptables.service
systemctl enable iptables.service
systemctl stop iptables.service