好文档 - 专业文书写作范文服务资料分享网站

Redhat7.4安装mysql5.7

天下 分享 时间: 加入收藏 我要投稿 点赞

Redhat7.4安装mysql5.7

1 卸载默认mariadb

查询:rpm–qa| grep mairadb

卸载:rpm–e –nodepsmariadb-libs-5.5.56-2.el7.x86_64 或者使用yum

Yum remove mairadb*

2 下载软件并上传到服务器

mysql-5.7.20-1.el7.x86_64.rpm-bundle.tar

3 安装

tar–vxfmysql-5.7.20-1.el7.x86_64.rpm-bundle.tar 解压后为:

安装:

[root@localhost Downloads]#rpm -ivh mysql-community-common-5.7.20-1.el7.x86_64.rpm warning: mysql-community-common-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ################################# [100%] Updating / installing...

1:mysql-community-common-5.7.20-1.e################################# [100%] [root@localhost Downloads]# rpm -ivh mysql-community-libs-5.7.20-1.el7.x86_64.rpm

warning: mysql-community-libs-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ################################# [100%] Updating / installing...

1:mysql-community-libs-5.7.20-1.el7################################# [100%]

[root@localhost Downloads]#rpm -ivh mysql-community-embedded-5.7.20-1.el7.x86_64.rpm warning: mysql-community-embedded-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ################################# [100%] Updating / installing...

1:mysql-community-embedded-5.7.20-1################################# [100%] [root@localhost Downloads]# rpm -ivh mysql-community-devel-5.7.20-1.el7.x86_64.rpm

warning: mysql-community-devel-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ################################# [100%] Updating / installing...

1:mysql-community-devel-5.7.20-1.el################################# [100%] [root@localhost Downloads]# rpm -ivh mysql-community-embedded-devel-5.7.20-1.el7.x86_64.rpm

warning: mysql-community-embedded-devel-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ################################# [100%] Updating / installing...

1:mysql-community-embedded-devel-5.################################# [100%] [root@localhost Downloads]# rpm -ivh mysql-community-client-5.7.20-1.el7.x86_64.rpm

warning: mysql-community-client-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ################################# [100%] Updating / installing...

1:mysql-community-client-5.7.20-1.e################################# [100%] [root@localhost Downloads]#rpm -ivh mysql-community-server-5.7.20-1.el7.x86_64.rpm

warning: mysql-community-server-5.7.20-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ################################# [100%] Updating / installing...

1:mysql-community-server-5.7.20-1.e################################# [100%]

4 修改root用户密码

4.1 修改/etc/my.cnf

在文件尾部添加skip-grant-tables

4.2 启动mysql

systemctl start mysqld

4.3 修改root密码

mysql–u root –p 空密码登录 usemysql

update user set password_expired=”N” where user = “root”;

update user set authentication_string=password(“1234”) where user=”root”; flushprivilegens;

Redhat7.4安装mysql5.7

Redhat7.4安装mysql5.71卸载默认mariadb查询:rpm–qa|grepmairadb卸载:rpm–e–nodepsmariadb-libs-5.5.56-2.el7.x86_64或者使用yumYumremovemairadb*2下载软件并上传到服务器mysql-
推荐度:
点击下载文档文档为doc格式
3oxct756qn1x2cx44e354ncj33s24s019ov
领取福利

微信扫码领取福利

微信扫码分享