真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

CentOS7.4怎么用rpm包安裝mysql5.7.17-創(chuàng)新互聯(lián)

本篇內(nèi)容介紹了“CentOS7.4怎么用rpm包安裝mysql5.7.17”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

成都創(chuàng)新互聯(lián)公司服務(wù)項(xiàng)目包括臨泉網(wǎng)站建設(shè)、臨泉網(wǎng)站制作、臨泉網(wǎng)頁(yè)制作以及臨泉網(wǎng)絡(luò)營(yíng)銷策劃等。多年來(lái),我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,臨泉網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到臨泉省份的部分城市,未來(lái)相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!

操作系統(tǒng)環(huán)境:

  1. CentOS Linux release 7.4.1708 (Core)

MySQL版本:5.7.17

一,卸載mariadb-lib

  1. [root@iZ2ze6jo3o3bqbcongnypqZ lib]# rpm -qa|grep mariadb

  2. mariadb-libs-5.5.56-2.el7.x86_64 

  3. [root@iZ2ze6jo3o3bqbcongnypqZ ~]# yum -y remove mariadb-libs-5.5.56-2.el7.x86_64

  4. Loaded plugins: fastestmirror

  5. Resolving Dependencies

  6. --> Running transaction check

  7. ---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be erased

  8. --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64

  9. --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64

  10. --> Running transaction check

  11. ---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased

  12. --> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.1-27.el7.centos.1.x86_64

  13. --> Restarting Dependency Resolution with new changes.

  14. --> Running transaction check

  15. ---> Package redhat-lsb-core.x86_64 0:4.1-27.el7.centos.1 will be erased

  16. --> Finished Dependency Resolution

  17. Dependencies Resolved

  18. ==============================================================================================================================================================================================================================================================================

  19.  Package Arch Version Repository Size

  20. ==============================================================================================================================================================================================================================================================================

  21. Removing:

  22.  mariadb-libs x86_64 1:5.5.56-2.el7 @base 4.4 M

  23. Removing for dependencies:

  24.  postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M

  25.  redhat-lsb-core x86_64 4.1-27.el7.centos.1 @base 45 k

  26. Transaction Summary

  27. ==============================================================================================================================================================================================================================================================================

  28. Remove 1 Package (+2 Dependent packages)

  29. Installed size: 17 M

  30. Downloading packages:

  31. Running transaction check

  32. Running transaction test

  33. Transaction test succeeded

  34. Running transaction

  35.   Erasing : redhat-lsb-core-4.1-27.el7.centos.1.x86_64 1/3 

  36.   Erasing : 2:postfix-2.10.1-6.el7.x86_64 2/3 

  37.   Erasing : 1:mariadb-libs-5.5.56-2.el7.x86_64 3/3 

  38.   Verifying : 1:mariadb-libs-5.5.56-2.el7.x86_64 1/3 

  39.   Verifying : 2:postfix-2.10.1-6.el7.x86_64 2/3 

  40.   Verifying : redhat-lsb-core-4.1-27.el7.centos.1.x86_64 3/3 

  41. Removed:

  42.   mariadb-libs.x86_64 1:5.5.56-2.el7 

  43. Dependency Removed:

  44.   postfix.x86_64 2:2.10.1-6.el7 redhat-lsb-core.x86_64 0:4.1-27.el7.centos.1 

  45. Complete!

undefined


二,下載mysql5.7.17rpm安裝包,具體是mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar

  1. wget https://downloads.mysql.com/archives/get/file/mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar

三,解壓


  1. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# tar -xvf mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar


  1. -rw-r--r-- 1 7155 31415 25037548 Nov 30 2016 mysql-community-client-5.7.17-1.el7.x86_64.rpm

  2. -rw-r--r-- 1 7155 31415 277812 Nov 30 2016 mysql-community-common-5.7.17-1.el7.x86_64.rpm

  3. -rw-r--r-- 1 7155 31415 3774276 Nov 30 2016 mysql-community-devel-5.7.17-1.el7.x86_64.rpm

  4. -rw-r--r-- 1 7155 31415 45474744 Nov 30 2016 mysql-community-embedded-5.7.17-1.el7.x86_64.rpm

  5. -rw-r--r-- 1 7155 31415 23925668 Nov 30 2016 mysql-community-embedded-compat-5.7.17-1.el7.x86_64.rpm

  6. -rw-r--r-- 1 7155 31415 126047424 Nov 30 2016 mysql-community-embedded-devel-5.7.17-1.el7.x86_64.rpm

  7. -rw-r--r-- 1 7155 31415 2237116 Nov 30 2016 mysql-community-libs-5.7.17-1.el7.x86_64.rpm

  8. -rw-r--r-- 1 7155 31415 2112724 Nov 30 2016 mysql-community-libs-compat-5.7.17-1.el7.x86_64.rpm

  9. -rw-r--r-- 1 7155 31415 54571580 Nov 30 2016 mysql-community-minimal-debuginfo-5.7.17-1.el7.x86_64.rpm

  10. -rw-r--r-- 1 7155 31415 169496800 Nov 30 2016 mysql-community-server-5.7.17-1.el7.x86_64.rpm

  11. -rw-r--r-- 1 7155 31415 14478292 Nov 30 2016 mysql-community-server-minimal-5.7.17-1.el7.x86_64.rpm

  12. -rw-r--r-- 1 7155 31415 116682212 Nov 30 2016 mysql-community-test-5.7.17-1.el7.x86_64.rpm

四,安裝

要按照如下順序安裝

  1. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-common-5.7.17-1.el7.x86_64.rpm

  2. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-libs-5.7.17-1.el7.x86_64.rpm

  3. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-libs-compat-5.7.17-1.el7.x86_64

  4. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-devel-5.7.17-1.el7.x86_64

  5. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-client-5.7.17-1.el7.x86_64.rpm

  6. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# rpm -ivh mysql-community-server-5.7.17-1.el7.x86_64.rpm

在安裝server的時(shí)候報(bào)錯(cuò)


  1. [root@iZ2ze6jo3o3bqbcongnypoZ ~]# rpm -ivh mysql-community-server-5.7.17-1.el7.x86_64.rpm

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

  3. error: Failed dependencies:

  4.     libaio.so.1()(64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64

  5.     libaio.so.1(LIBAIO_0.1)(64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64

  6.     libaio.so.1(LIBAIO_0.4)(64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64


缺少libaio.so,用yum安裝上:


  1. [root@iZ2ze6jo3o3bqbcongnypoZ ~]# yum install libaio*

  2. Loaded plugins: fastestmirror

  3. Loading mirror speeds from cached hostfile

  4.  * base: mirrors.cloud.aliyuncs.com

  5.  * epel: mirrors.cloud.aliyuncs.com

  6.  * extras: mirrors.cloud.aliyuncs.com

  7.  * updates: mirrors.cloud.aliyuncs.com

  8. Resolving Dependencies

  9. --> Running transaction check

  10. ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed

  11. ---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed

  12. --> Finished Dependency Resolution

  13. Dependencies Resolved

  14. ==============================================================================================================================================================================================================================================================================

  15.  Package Arch Version Repository Size

  16. ==============================================================================================================================================================================================================================================================================

  17. Installing:

  18.  libaio x86_64 0.3.109-13.el7 base 24 k

  19.  libaio-devel x86_64 0.3.109-13.el7 base 13 k

  20. Transaction Summary

  21. ==============================================================================================================================================================================================================================================================================

  22. Install 2 Packages

  23. Total download size: 37 k

  24. Installed size: 46 k

  25. Is this ok [y/d/N]: y

  26. Downloading packages:

  27. (1/2): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00 

  28. (2/2): libaio-devel-0.3.109-13.el7.x86_64.rpm | 13 kB 00:00:00 

  29. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  30. Total 243 kB/s | 37 kB 00:00:00 

  31. Running transaction check

  32. Running transaction test

  33. Transaction test succeeded

  34. Running transaction

  35. Warning: RPMDB altered outside of yum.

  36.   Installing : libaio-0.3.109-13.el7.x86_64 1/2 

  37.   Installing : libaio-devel-0.3.109-13.el7.x86_64 2/2 

  38.   Verifying : libaio-0.3.109-13.el7.x86_64 1/2 

  39.   Verifying : libaio-devel-0.3.109-13.el7.x86_64 2/2 

  40. Installed:

  41.   libaio.x86_64 0:0.3.109-13.el7 libaio-devel.x86_64 0:0.3.109-13.el7 

  42. Complete!


五,找到密碼:


找到數(shù)據(jù)庫(kù)的初始密碼,最后一行冒號(hào)后面的就是

  1. [root@iZ2ze6jo3o3bqbcongnypqZ mysql]# cat /var/log/mysqld.log 

  2. 2017-11-03T08:41:25.257336Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

  3. 2017-11-03T08:41:26.329912Z 0 [Warning] InnoDB: New log files created, LSN=45790

  4. 2017-11-03T08:41:26.543807Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

  5. 2017-11-03T08:41:26.566468Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: c79a2e4b-c072-11e7-b809-00163e0ad76e.

  6. 2017-11-03T08:41:26.570349Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

  7. 2017-11-03T08:41:26.571065Z 1 [Note] A temporary password is generated for root@localhost: 7PkQ:l


六,啟動(dòng)mysql


  1. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# systemctl start mysqld.service

  2. [root@iZ2ze6jo3o3bqbcongnyppZ ~]# mysql -uroot -p

  3. Enter password: 

  4. Welcome to the MySQL monitor. Commands end with ; or \g.

  5. Your MySQL connection id is 3

  6. Server version: 5.7.17

  7. Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

  8. Oracle is a registered trademark of Oracle Corporation and/or its

  9. affiliates. Other names may be trademarks of their respective

  10. owners.

  11. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

  12. mysql>

七,修改密碼

臨時(shí)密碼過(guò)期了,需要修改
  1. mysql> show databases;

  2. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.


用如下命令修改

  1. ALTER USER 'root'@'localhost' IDENTIFIED BY 'yournew_password';

“CentOS7.4怎么用rpm包安裝mysql5.7.17”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!


分享標(biāo)題:CentOS7.4怎么用rpm包安裝mysql5.7.17-創(chuàng)新互聯(lián)
當(dāng)前地址:http://weahome.cn/article/dcejsp.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部