In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to install mysql5.7.17 with rpm package in CentOS7.4". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Operating system environment:
CentOS Linux release 7.4.1708 (Core)
MySQL version: 5.7.17
One, uninstall mariadb-lib
[root@iZ2ze6jo3o3bqbcongnypqZ lib] # rpm-qa | grep mariadb
Mariadb-libs-5.5.56-2.el7.x86_64
[root@iZ2ze6jo3o3bqbcongnypqZ] # yum-y remove mariadb-libs-5.5.56-2.el7.x86_64
Loaded plugins: fastestmirror
Resolving Dependencies
-> Running transaction check
-> Package mariadb-libs.x86_64 1 5.5.56-2.el7 will be erased
-> Processing Dependency: libmysqlclient.so.18 () (64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
-> Processing Dependency: libmysqlclient.so.18 (libmysqlclient_18) (64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
-> Running transaction check
-> Package postfix.x86_64 2 2.10.1-6.el7 will be erased
Processing Dependency: / usr/sbin/sendmail for package: redhat-lsb-core-4.1-27.el7.centos.1.x86_64
-> Restarting Dependency Resolution with new changes.
-> Running transaction check
-> Package redhat-lsb-core.x86_64 0RU 4.1-27.el7.centos.1 will be erased
-> Finished Dependency Resolution
Dependencies Resolved
=
Package Arch Version Repository Size
=
Removing:
Mariadb-libs x86x 64 1purl 5.5.56-2.el7 @ base 4.4m
Removing for dependencies:
Postfix x86 "64 2purl 2.10.1-6.el7 @ anaconda 12 M
Redhat-lsb-core x86 million 64 4.1-27.el7.centos.1 @ base 45k
Transaction Summary
=
Remove 1 Package (+ 2 Dependent packages)
Installed size: 17 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing: redhat-lsb-core-4.1-27.el7.centos.1.x86_64 1 Compact 3
Erasing: 2:postfix-2.10.1-6.el7.x86_64 2 Compact 3
Erasing: 1:mariadb-libs-5.5.56-2.el7.x86_64 3 Compact 3
Verifying: 1:mariadb-libs-5.5.56-2.el7.x86_64 1 Compact 3
Verifying: 2:postfix-2.10.1-6.el7.x86_64 2 Compact 3
Verifying: redhat-lsb-core-4.1-27.el7.centos.1.x86_64 3 Compact 3
Removed:
Mariadb-libs.x86_64 1Rank 5.5.56-2.el7
Dependency Removed:
Postfix.x86_64 2vl 2.10.1-6.el7 redhat-lsb-core.x86_64 0vl 4.1-27.el7.centos.1
Complete!
Undefined
Second, download the mysql5.7.17rpm installation package, specifically mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar
Wget https://downloads.mysql.com/archives/get/file/mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar
Third, decompression
[root@iZ2ze6jo3o3bqbcongnyppZ] # tar-xvf mysql-5.7.17-1.el7.x86_64.rpm-bundle.tar
-rw-r--r-- 1 7155 31415 25037548 Nov 30 2016 mysql-community-client-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 277812 Nov 30 2016 mysql-community-common-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 3774276 Nov 30 2016 mysql-community-devel-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 45474744 Nov 30 2016 mysql-community-embedded-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 23925668 Nov 30 2016 mysql-community-embedded-compat-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 126047424 Nov 30 2016 mysql-community-embedded-devel-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 2237116 Nov 30 2016 mysql-community-libs-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 2112724 Nov 30 2016 mysql-community-libs-compat-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 54571580 Nov 30 2016 mysql-community-minimal-debuginfo-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 169496800 Nov 30 2016 mysql-community-server-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 14478292 Nov 30 2016 mysql-community-server-minimal-5.7.17-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 116682212 Nov 30 2016 mysql-community-test-5.7.17-1.el7.x86_64.rpm
Fourth, installation
To install in the following order
[root@iZ2ze6jo3o3bqbcongnyppZ] # rpm-ivh mysql-community-common-5.7.17-1.el7.x86_64.rpm
[root@iZ2ze6jo3o3bqbcongnyppZ] # rpm-ivh mysql-community-libs-5.7.17-1.el7.x86_64.rpm
[root@iZ2ze6jo3o3bqbcongnyppZ] # rpm-ivh mysql-community-libs-compat-5.7.17-1.el7.x86_64
[root@iZ2ze6jo3o3bqbcongnyppZ] # rpm-ivh mysql-community-devel-5.7.17-1.el7.x86_64
[root@iZ2ze6jo3o3bqbcongnyppZ] # rpm-ivh mysql-community-client-5.7.17-1.el7.x86_64.rpm
[root@iZ2ze6jo3o3bqbcongnyppZ] # rpm-ivh mysql-community-server-5.7.17-1.el7.x86_64.rpm
An error was reported when installing server
[root@iZ2ze6jo3o3bqbcongnypoZ] # rpm-ivh mysql-community-server-5.7.17-1.el7.x86_64.rpm
Warning: mysql-community-server-5.7.17-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Error: Failed dependencies:
Libaio.so.1 () (64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64
Libaio.so.1 (LIBAIO_0.1) (64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64
Libaio.so.1 (LIBAIO_0.4) (64bit) is needed by mysql-community-server-5.7.17-1.el7.x86_64
Libaio.so is missing. Install it with yum:
[root@iZ2ze6jo3o3bqbcongnypoZ ~] # yum install libaio*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cloud.aliyuncs.com
* epel: mirrors.cloud.aliyuncs.com
* extras: mirrors.cloud.aliyuncs.com
* updates: mirrors.cloud.aliyuncs.com
Resolving Dependencies
-> Running transaction check
-> Package libaio.x86_64 0RU 0.3.109-13.el7 will be installed
-> Package libaio-devel.x86_64 0RU 0.3.109-13.el7 will be installed
-> Finished Dependency Resolution
Dependencies Resolved
=
Package Arch Version Repository Size
=
Installing:
Libaio x8631 64 0.3.109-13.el7 base 24k
Libaio-devel x8631 64 0.3.109-13.el7 base 13k
Transaction Summary
=
Install 2 Packages
Total download size: 37 k
Installed size: 46 k
Is this ok [y/d/N]: y
Downloading packages:
(1ap2): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00
(2ap2): libaio-devel-0.3.109-13.el7.x86_64.rpm | 13 kB 00:00:00
- - -
Total 243kB/s | 37 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing: libaio-0.3.109-13.el7.x86_64 1 Compact 2
Installing: libaio-devel-0.3.109-13.el7.x86_64 2 Compact 2
Verifying: libaio-0.3.109-13.el7.x86_64 1 Compact 2
Verifying: libaio-devel-0.3.109-13.el7.x86_64 2 Compact 2
Installed:
Libaio.x86_64 0RO 0.3.109-13.el7 libaio-devel.x86_64 0RU 0.3.109-13.el7
Complete!
Fifth, find the password:
Find the initial password of the database, and the last line after the colon is
[root@iZ2ze6jo3o3bqbcongnypqZ mysql] # cat / var/log/mysqld.log
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).
2017-11-03T08:41:26.329912Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-11-03T08:41:26.543807Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
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.
2017-11-03T08:41:26.570349Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-11-03T08:41:26.571065Z 1 [Note] A temporary password is generated for root@localhost: 7PkQ:l
Seventh, change the password
The temporary password has expired and needs to be modified
Mysql > show databases
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
Modify it with the following command
ALTER USER 'root'@'localhost' IDENTIFIED BY' yournew_password'
This is the end of the content of "how to install mysql5.7.17 with rpm package in CentOS7.4". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.