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

Rpm installation example of R1-003 MySQL

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

Share

Shulou(Shulou.com)06/01 Report--

1 、 Extract tar package [root@hhu MySQL] # tar-xvf mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar mysql-community-test-5.7.17-1.el6.x86_64.rpm mysql-community-embedded-5.7.17-1.el6.x86_64.rpm mysql-community-embedded-devel-5.7.17-1.el6.x86_64.rpm mysql-community-server-5.7.17-1.el6.x86_64 .rpm mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm mysql-community-devel-5.7.17-1.el6.x86_64.rpm mysql-community-client-5.7.17-1.el6.x86_64.rpm mysql-community-libs-5.7.17-1.el6.x86_64.rpm mysql-community-common-5.7.17-1.el6.x86_64.rpm [root@hhu MySQL] # ls mysql-5 .7.17-1.el6.x86_64.rpm-bundle.tar mysql-community-embedded-devel-5.7.17-1.el6.x86_64.rpm mysql-community-client-5.7.17-1.el6.x86_64.rpm mysql-community-libs-5.7.17-1.el6.x86_64.rpm mysql-community-common-5.7.17-1.el6.x86_64.rpm mysql-community-libs-compat-5.7.17-1. El6.x86_64.rpm mysql-community-devel-5.7.17-1.el6.x86_64.rpm mysql-community-server-5.7.17-1.el6.x86_64.rpm mysql-community-embedded-5.7.17-1.el6.x86_64.rpm mysql-community-test-5.7.17-1.el6.x86_64.rpm 2, Uninstall the old version of MySQL [root@hhu MySQL] # rpm-qa | grep mysql mysql-5.1.71-1.el6.x86_64 mysql-devel-5.1.71-1.el6.x86_64 mysql-libs-5.1.71-1.el6.x86_64 [root@hhu MySQL] # rpm-e mysql-5.1.71-1.el6.x86_64 error: Failed dependencies: mysql = 5.1.71-1.el6 is needed by (installed) mysql-devel-5 .1.71-1.el6.x86_64 [root@hhu MySQL] # rpm-e mysql-devel-5.1.71- [root@hhu MySQL] # rpm-qa | grep mysql mysql-5.1.71-1.el6.x86_64 mysql-libs-5.1.71-1.el6.x86_64 [root@hhu MySQL] # rpm-e mysql-5.1.71-1.el6.x86_64 [root@hhu MySQL] # rpm-e mysql-libs-5.1.71 -1.el6.x86_64 error: Failed dependencies: libmysqlclient.so.16 () (64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64 libmysqlclient.so.16 (libmysqlclient_16) (64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64 mysql-libs is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64 [root@hhu MySQL] # rpm-e mysql-libs-5.1.71-1.el6.x86_64-- nodeps forced uninstall [root@hhu MySQL] # rpm-qa | grep mysql [root@hhu MySQL] # 3. Install the MySQL package There are five of them, and there will be dependencies. The installation sequence is as follows: rpm-Uvh mysql-community-common-5.7.17-1.el6.x86_64.rpm rpm-Uvh mysql-community-libs-5.7.17-1.el6.x86_64.rpm rpm-Uvh mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm rpm-Uvh mysql-community-client-5.7.17-1.el6.x86_64.rpm rpm-Uvh mysql-community-server-5.7.17- 1.el6.x86_64.rpm [root@hhu MySQL] # ls mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar mysql-community-embedded-devel-5.7.17-1.el6.x86_64.rpm mysql-community-client-5.7.17-1.el6.x86_64.rpm mysql-community-libs-5.7.17-1.el6.x86_64.rpm mysql-community-common-5.7.17-1.el6.x86 _ 64.rpm mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm mysql-community-devel-5.7.17-1.el6.x86_64.rpm mysql-community-server-5.7.17-1.el6.x86_64.rpm mysql-community-embedded-5.7.17-1.el6.x86_64.rpm mysql-community-test-5.7.17-1.el6.x86_64.rpm [root@hhu MySQL] # rpm- Uvh mysql-community-common-5.7.17-1.el6.x86_64.rpm warning: mysql-community-common-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEY Preparing... # 1:mysql-community-common # [root@hhu MySQL] # rpm-Uvh mysql-community-libs- 5.7.17-1.el6.x86_64.rpm warning: mysql-community-libs-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEY Preparing... # 1:mysql-community-libs # [root@hhu MySQL] # rpm-Uvh mysql-community-libs- Compat-5.7.17-1.el6.x86_64.rpm warning: mysql-community-libs-compat-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEY Preparing... # [100%] 1:mysql-community-libs-co### [100%] [root@hhu MySQL] # rpm-Uvh mysql-community- Client-5.7.17-1.el6.x86_64.rpm warning: mysql-community-client-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEY Preparing... # 1:mysql-community-client # [root@hhu MySQL] # rpm-Uvh mysql-community-server- 5.7.17-1.el6.x86_64.rpm warning: mysql-community-server-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature Key ID 5072e1f5: NOKEY Preparing... # 1:mysql-community-server # [root@hhu MySQL] # service mysqld status mysqld is stopped [root@ Hhu MySQL] # service mysqld start Initializing MySQL database: [OK] Installing validate password plugin: [OK] Starting mysqld: [OK] 4 、 Get the temporary password of the superdatabase user Login and change the password [root@hhu MySQL] # grep 'temporary password' / var/log/mysqld.log 2017-02-23T01:36:39.249352Z 1 [Note] A temporary password is generated for root@localhost: i7NmqxstDZ?L [root@hhu MySQL] # mysql-uroot-p Enter password: Welcome to the MySQL monitor. Commands end with; or\ g. Your MySQL connection id is 4 Server version: 5.7.17 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement. Mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' MyNewPass4 passport; Query OK, 0 rows affected (0.00 sec)

Mysql > quit Bye

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