1 mysql
2 rpm -qa | grep mariadb
3 rpm -e --nodeps
4 mariadb-libs-5.5.60-1.el7_5.x86_64
5 rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64
6 rpm -qa | grep mariadb
7 yum install -y per net-tools
8 cd /usr/local/
9 wget http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm
10 yum install -y wget
11 wget http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm
12 rpm -ivh mysql-community-release-el7-7.noarch.rpm
13 yum install -y mysql-server
14 systemctl start mysqld
15 systemctl status mysqld
16 mysqladmin -u root password 'root'
17 mysql -u root -p
18 systemctl stop firewall
19 systemctl stop firewalld
20 mysql -version
开放远程连接:
mysql> grant all privileges on . to 'root'@'%' identified by 'YtLy2021~!' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
开放指定端口的防火墙:
[root@VM-8-17-centos ~]# firewall-cmd --zone=public --add-port=3306/tcp --permanent
[root@VM-8-17-centos ~]# systemctl restart firewalld
非特殊说明,本博所有文章均为博主原创。
如若转载,请注明出处:https://miaoweb.online/159/
共有 0 条评论