久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

如何使用yum方式安裝mysql5.7 on linux

144次閱讀
沒有評論

共計 11367 個字符,預計需要花費 29 分鐘才能閱讀完成。

這篇文章主要介紹了如何使用 yum 方式安裝 mysql5.7 on linux_64,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓丸趣 TV 小編帶著大家一起了解一下。

1. 下載并安裝 RPM
https://dev.mysql.com/downloads/repo/yum/
rpm -ivh mysql57-community-release-el6-11.noarch.rpm

2. 確認安裝成功

點擊 (此處) 折疊或打開

# yum repolist enabled | grep mysql.*-community.*

This system is not registered with RHN.

RHN support will be disabled.

http://repo.mysql.com/yum/mysql-connectors-community/el/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 –

Trying other mirror.

mysql-connectors-community           MySQL Connectors Community           0

mysql-tools-community                MySQL Tools Community                0

mysql57-community                    MySQL 5.7 Community Server           0

3. 選擇安裝程序
編輯文件 /etc/yum.repos.d/mysql-community.repo, 將想安裝的版本條目 enable=1

點擊 (此處) 折疊或打開

[mysql57-community]

name=MySQL 5.7 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

點擊 (此處) 折疊或打開

# yum repolist enabled | grep mysql

This system is not registered with RHN.

RHN support will be disabled.

mysql57-community               MySQL 5.7 Community Server                  237

4. 確保連接至 internet

點擊 (此處) 折疊或打開

[root@mysql1 network-scripts]# cat ifcfg-eth0

DEVICE= eth0

HWADDR= 00:0C:29:68:EC:D8

NM_CONTROLLED= yes

ONBOOT= yes

BOOTPROTO=none

IPADDR=192.168.1.200

NETMASK=255.255.255.0

GATEWAY=192.168.1.1

[root@mysql1 network-scripts]# cat /etc/resolv.conf

nameserver 114.114.114.114

nameserver 8.8.8.8

nameserver 192.168.0.1

點擊 (此處) 折疊或打開

curl http://repo.mysql.com/yum/mysql-5.6-community/el/6/x86_64/repodata/repomd.xml

5. 安裝 mysql

點擊 (此處) 折疊或打開

# yum install mysql-community-server

Loaded plugins: rhnplugin

This system is not registered with RHN.

RHN support will be disabled.

Setting up Install Process

Resolving Dependencies

— Running transaction check

— Package mysql-community-server.x86_64 0:5.7.21-1.el6 set to be updated

— Processing Dependency: mysql-community-common(x86-64) = 5.7.21-1.el6 for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: mysql-community-client(x86-64) = 5.7.9 for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: perl(strict) for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: perl(POSIX) for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: perl(Getopt::Long) for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: perl(File::Path) for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: libnuma.so.1(libnuma_1.2)(64bit) for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: libnuma.so.1(libnuma_1.1)(64bit) for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: /usr/bin/perl for package: mysql-community-server-5.7.21-1.el6.x86_64

— Processing Dependency: libnuma.so.1()(64bit) for package: mysql-community-server-5.7.21-1.el6.x86_64

— Running transaction check

— Package mysql-community-client.x86_64 0:5.7.21-1.el6 set to be updated

— Processing Dependency: mysql-community-libs(x86-64) = 5.7.9 for package: mysql-community-client-5.7.21-1.el6.x86_64

— Package mysql-community-common.x86_64 0:5.7.21-1.el6 set to be updated

— Package numactl.x86_64 0:2.0.3-9.el6 set to be updated

— Package perl.x86_64 4:5.10.1-115.el6 set to be updated

— Processing Dependency: perl-libs = 4:5.10.1-115.el6 for package: 4:perl-5.10.1-115.el6.x86_64

— Processing Dependency: perl(version) for package: 4:perl-5.10.1-115.el6.x86_64

— Processing Dependency: perl-libs for package: 4:perl-5.10.1-115.el6.x86_64

— Processing Dependency: perl(Pod::Simple) for package: 4:perl-5.10.1-115.el6.x86_64

— Processing Dependency: perl(Module::Pluggable) for package: 4:perl-5.10.1-115.el6.x86_64

— Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.10.1-115.el6.x86_64

— Running transaction check

— Package mysql-community-libs.x86_64 0:5.7.21-1.el6 set to be updated

— Package perl-Module-Pluggable.x86_64 1:3.90-115.el6 set to be updated

— Package perl-Pod-Simple.x86_64 1:3.13-115.el6 set to be updated

— Processing Dependency: perl(Pod::Escapes) = 1.04 for package: 1:perl-Pod-Simple-3.13-115.el6.x86_64

— Package perl-libs.x86_64 4:5.10.1-115.el6 set to be updated

— Package perl-version.x86_64 3:0.77-115.el6 set to be updated

— Running transaction check

— Package perl-Pod-Escapes.x86_64 1:1.04-115.el6 set to be updated

— Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================

Package                                                                 Arch                                                    Version                                                             Repository                                                          Size

==============================================================================================================================================================================================================================================================================

Installing:

mysql-community-server                                                  x86_64                                                  5.7.21-1.el6                                                        mysql57-community                                                  152 M

Installing for dependencies:

mysql-community-client                                                  x86_64                                                  5.7.21-1.el6                                                        mysql57-community                                                   23 M

mysql-community-common                                                  x86_64                                                  5.7.21-1.el6                                                        mysql57-community                                                  329 k

mysql-community-libs                                                    x86_64                                                  5.7.21-1.el6                                                        mysql57-community                                                  2.1 M

numactl                                                                 x86_64                                                  2.0.3-9.el6                                                         test                                                                55 k

perl                                                                    x86_64                                                  4:5.10.1-115.el6                                                    test                                                                10 M

perl-Module-Pluggable                                                   x86_64                                                  1:3.90-115.el6                                                      test                                                                36 k

perl-Pod-Escapes                                                        x86_64                                                  1:1.04-115.el6                                                      test                                                                29 k

perl-Pod-Simple                                                         x86_64                                                  1:3.13-115.el6                                                      test                                                               208 k

perl-libs                                                               x86_64                                                  4:5.10.1-115.el6                                                    test                                                               576 k

perl-version                                                            x86_64                                                  3:0.77-115.el6                                                      test                                                                48 k

Transaction Summary

==============================================================================================================================================================================================================================================================================

Install      11 Package(s)

Upgrade       0 Package(s)

Total download size: 189 M

Installed size: 919 M

Is this ok [y/N]: y

Downloading Packages:

(1/11): mysql-community-client-5.7.21-1.el6.x86_64.rpm                                                                                                                                                                                                 |  23 MB     00:09

(2/11): mysql-community-common-5.7.21-1.el6.x86_64.rpm                                                                                                                                                                                                 | 329 kB     00:00

(3/11): mysql-community-libs-5.7.21-1.el6.x86_64.rpm                                                                                                                                                                                                   | 2.1 MB     00:01

(4/11): mysql-community-server-5.7.21-1.el6.x86_64.rpm                                                                                                                                                                                                 | 152 MB     03:16

——————————————————————————————————————————————————————————————————————————————————————————

Total                                                                                                                                                                                                                                         925 kB/s | 189 MB     03:28

warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

mysql57-community/gpgkey                                                                                                                                                                                                                               |  54 kB     00:00 …

Importing GPG key 0x5072E1F5 MySQL Release Engineering from /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Is this ok [y/N]: y

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing     : mysql-community-common-5.7.21-1.el6.x86_64                                                                                                                                                                                                            1/11

Installing     : mysql-community-libs-5.7.21-1.el6.x86_64                                                                                                                                                                                                              2/11

Installing     : mysql-community-client-5.7.21-1.el6.x86_64                                                                                                                                                                                                            3/11

Installing     : 1:perl-Pod-Escapes-1.04-115.el6.x86_64                                                                                                                                                                                                                4/11

Installing     : 3:perl-version-0.77-115.el6.x86_64                                                                                                                                                                                                                    5/11

Installing     : 4:perl-libs-5.10.1-115.el6.x86_64                                                                                                                                                                                                                     6/11

Installing     : 1:perl-Pod-Simple-3.13-115.el6.x86_64                                                                                                                                                                                                                 7/11

Installing     : 1:perl-Module-Pluggable-3.90-115.el6.x86_64                                                                                                                                                                                                           8/11

Installing     : 4:perl-5.10.1-115.el6.x86_64                                                                                                                                                                                                                          9/11

Installing     : numactl-2.0.3-9.el6.x86_64                                                                                                                                                                                                                           10/11

Installing     : mysql-community-server-5.7.21-1.el6.x86_64                                                                                                                                                                                                           11/11

Installed:

mysql-community-server.x86_64 0:5.7.21-1.el6

Dependency Installed:

mysql-community-client.x86_64 0:5.7.21-1.el6     mysql-community-common.x86_64 0:5.7.21-1.el6     mysql-community-libs.x86_64 0:5.7.21-1.el6     numactl.x86_64 0:2.0.3-9.el6           perl.x86_64 4:5.10.1-115.el6     perl-Module-Pluggable.x86_64 1:3.90-115.el6

perl-Pod-Escapes.x86_64 1:1.04-115.el6           perl-Pod-Simple.x86_64 1:3.13-115.el6            perl-libs.x86_64 4:5.10.1-115.el6              perl-version.x86_64 3:0.77-115.el6

Complete!

啟動服務

點擊 (此處) 折疊或打開

[root@mysql1 yum.repos.d]# service mysqld start

Initializing MySQL database:                               [ OK  ]

Starting mysqld:                                           [ OK  ]

[root@mysql1 yum.repos.d]# service mysqld status

mysqld (pid  1628) is running..

6. 修改 root 密碼
- 獲得 root 初識密碼

點擊 (此處) 折疊或打開

]# grep temporary password /var/log/mysqld.log

2018-02-25T22:53:03.372590Z 1 [Note] A temporary password is generated for root@localhost: +(LVH%nyg1vC

– 登錄 root
# mysql -uroot -p

- 修改 root 密碼

點擊 (此處) 折疊或打開

mysql ALTER USER root @ localhost IDENTIFIED BY MyNewPass4!

Query OK, 0 rows affected (0.01 sec)

點擊 (此處) 折疊或打開

Grant all privileges on *.* to root @ % identified by MyNewPass4! with grant option;

flush privileges;

感謝你能夠認真閱讀完這篇文章,希望丸趣 TV 小編分享的“如何使用 yum 方式安裝 mysql5.7 on linux_64”這篇文章對大家有幫助,同時也希望大家多多支持丸趣 TV,關注丸趣 TV 行業資訊頻道,更多相關知識等著你來學習!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-27發表,共計11367字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 马尔康县| 开远市| 秭归县| 临夏市| 什邡市| 沁源县| 镇坪县| 江门市| 博野县| 伊宁县| 樟树市| 张家港市| 加查县| 遵义市| 武邑县| 仁寿县| 盐源县| 开鲁县| 邹平县| 武功县| 育儿| 东乡县| 大冶市| 贵定县| 山丹县| 西盟| 涿鹿县| 朝阳区| 望都县| 万山特区| 武鸣县| 深圳市| 枣庄市| 浦东新区| 黎城县| 鲁山县| 临海市| 林甸县| 靖州| 东莞市| 桃园县|