CentenOS 7 安装Mysql5.6.51

星期六一 2024-3-28 97 3/28

​ 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
- THE END -

星期六一

3月28日09:34

最后修改:2024年3月28日
0

非特殊说明,本博所有文章均为博主原创。

共有 0 条评论