這篇文章主要介紹了如何使用yum方式安裝mysql5.7 on linux_64,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
創(chuàng)新互聯(lián)主要從事成都網(wǎng)站設(shè)計、成都網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)興安,10年網(wǎng)站建設(shè)經(jīng)驗,價格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):189808205751.下載并安裝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 /tupian/20230522/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!
啟動服務(wù)
點擊(此處)折疊或打開
[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;
感謝你能夠認真閱讀完這篇文章,希望小編分享的“如何使用yum方式安裝mysql5.7 on linux_64”這篇文章對大家有幫助,同時也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道,更多相關(guān)知識等著你來學習!
網(wǎng)頁名稱:如何使用yum方式安裝mysql5.7onlinux_64-創(chuàng)新互聯(lián)
網(wǎng)站鏈接:http://muchs.cn/article38/pddpp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開發(fā)、動態(tài)網(wǎng)站、ChatGPT、品牌網(wǎng)站制作、網(wǎng)站設(shè)計公司、做網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容