Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install mysql5.7 on linux_64 using yum

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to use yum to install mysql5.7 on linux_64, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

1. Download and install RPM

Https://dev.mysql.com/downloads/repo/yum/

Rpm-ivh mysql57-community-release-el6-11.noarch.rpm

two。 Confirm the installation is successful

Click (here) to collapse or open

# 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. Select installer

Edit the file / etc/yum.repos.d/mysql-community.repo and change the version entry enable=1 that you want to install

Click (here) to collapse or open

[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

Click (here) to collapse or open

# 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. Make sure you are connected to the internet

Click (here) to collapse or open

[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

Click (here) to collapse or open

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

5. Install mysql

Click (here) to collapse or open

# 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 0RU 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 0RU 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 0RU 5.7.21-1.el6 set to be updated

-> Package numactl.x86_64 0RU 2.0.3-9.el6 set to be updated

-> Package perl.x86_64 4vl 5.10.1-115.el6 set to be updated

-- > Processing Dependency: perl-libs = 4RV 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 0RU 5.7.21-1.el6 set to be updated

-> Package perl-Module-Pluggable.x86_64 1RU 3.90-115.el6 set to be updated

-> Package perl-Pod-Simple.x86_64 1RU 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 4vl 5.10.1-115.el6 set to be updated

-> Package perl-version.x86_64 3RU 0.77-115.el6 set to be updated

-> Running transaction check

-> Package perl-Pod-Escapes.x86_64 1purl 1.04-115.el6 set to be updated

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Mysql-community-server x8631 64 5.7.21-1.el6 mysql57-community 152m

Installing for dependencies:

Mysql-community-client x8631 64 5.7.21-1.el6 mysql57-community 23 M

Mysql-community-common x8631 64 5.7.21-1.el6 mysql57-community 329k

Mysql-community-libs x8631 64 5.7.21-1.el6 mysql57-community 2.1m

Numactl x8631 64 2.0.3-9.el6 test 55k

Perl x86 "64 4purl 5.10.1-115.el6 test 10m

Perl-Module-Pluggable x86'64 1purl 3.90-115.el6 test 36k

Perl-Pod-Escapes x86'64 1purl 1.04-115.el6 test 29k

Perl-Pod-Simple x86x 64 1purl 3.13-115.el6 test 208k

Perl-libs x86 "64 4VR 5.10.1-115.el6 test 576k

Perl-version x86x 64 3 0.77-115.el6 test 48k

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:

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

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

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

(4 take 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 1Comp11

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

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

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

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

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

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

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

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

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

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

Installed:

Mysql-community-server.x86_64 0RO 5.7.21-1.el6

Dependency Installed:

Mysql-community-client.x86_64 0VOR 5.7.21-1.el6 mysql-community-common.x86_64 0VOR 5.7.21-1.el6 mysql-community-libs.x86_64 0VOR 5.7.21-1.el6 numactl.x86_64 0RU 2.0.3-9.el6 perl.x86_64 4VR 5.10.1-115.el6 perl-Module-Pluggable.x86_64 1RO 3.90-115.el6

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

Complete!

Start the service

Click (here) to collapse or open

[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. Modify root password

-get the root initial password

Click (here) to collapse or open

] # 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

-Log in to root

# mysql-uroot-p

-modify the root password

Click (here) to collapse or open

Mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' MyNewPass4passport'

Query OK, 0 rows affected (0.01 sec)

Click (here) to collapse or open

Grant all privileges on *. * to 'root'@'%' identified by' MyNewPass4passport' With grant option

Flush privileges

Thank you for reading this article carefully. I hope the article "how to install mysql5.7 on linux_64 using yum" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report