当前位置:网站首页>Tutorial on the principle and application of database system (005) -- Yum offline installation of MySQL 5.7 (Linux Environment)
Tutorial on the principle and application of database system (005) -- Yum offline installation of MySQL 5.7 (Linux Environment)
2022-07-01 16:23:00 【Rsda DBA_ WGX】
Database system principle and Application Tutorial (005)—— yum Offline installation MySQL5.7(Linux Environmental Science )
Catalog
One 、 uninstall MariaDB
[[email protected] Packages]# rpm -ivh lrzsz-0.12.20-36.el7.x86_64.rpm
Warning :lrzsz-0.12.20-36.el7.x86_64.rpm: head V3 RSA/SHA256 Signature, secret key ID f4a80eb5: NOKEY
In preparation ... ################################# [100%]
Upgrading / install ...
1:lrzsz-0.12.20-36.el7 ################################# [100%]
[[email protected] Packages]# yum remove -y mariadb-libs
Loaded plug-in :fastestmirror
Resolving dependencies
--> Checking transactions
---> software package mariadb-libs.x86_64.1.5.5.52-1.el7 Will be Delete
--> Dealing with dependencies libmysqlclient.so.18()(64bit), It's packaged 2:postfix-2.10.1-6.el7.x86_64 need
--> Dealing with dependencies libmysqlclient.so.18(libmysqlclient_18)(64bit), It's packaged 2:postfix-2.10.1-6.el7.x86_64 need
--> Checking transactions
---> software package postfix.x86_64.2.2.10.1-6.el7 Will be Delete
--> Resolve dependency complete
Dependency resolution
===================================================================================================
Package framework edition Source size
===================================================================================================
Deleting :
mariadb-libs x86_64 1:5.5.52-1.el7 @anaconda 4.4 M
Remove for dependency :
postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M
Business summary
====================================================================================================
remove 1 software package (+1 Dependent packages )
Installation size :17 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning :RPM The database has been disabled yum Program modification .
Deleting : 2:postfix-2.10.1-6.el7.x86_64 1/2
Deleting : 1:mariadb-libs-5.5.52-1.el7.x86_64 2/2
Verification in progress : 2:postfix-2.10.1-6.el7.x86_64 1/2
Verification in progress : 1:mariadb-libs-5.5.52-1.el7.x86_64 2/2
Delete :
mariadb-libs.x86_64 1:5.5.52-1.el7
Removed as a dependency :
postfix.x86_64 2:2.10.1-6.el7
complete !
Two 、 Take what you need rpm Package upload to server
[[email protected] mysql-soft]# pwd
/soft/mysql-soft
[[email protected] mysql-soft]# rz
[[email protected] mysql-soft]# ll
Total usage 196704
-rw-r--r--. 1 root root 25365436 6 month 12 2019 mysql-community-client-5.7.27-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 281248 6 month 12 2019 mysql-community-common-5.7.27-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 2272032 6 month 12 2019 mysql-community-libs-5.7.27-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 173500088 6 month 12 2019 mysql-community-server-5.7.27-1.el7.x86_64.rpm
3、 ... and 、 install rpm package
[[email protected] mysql-soft]# rpm -ivh --nodeps --force *.rpm
Warning :mysql-community-client-5.7.27-1.el7.x86_64.rpm: head V3 DSA/SHA1 Signature, secret key ID 5072e1f5: NOKEY
In preparation ... ################################# [100%]
Upgrading / install ...
1:mysql-community-common-5.7.27-1.e################################# [ 25%]
2:mysql-community-libs-5.7.27-1.el7################################# [ 50%]
3:mysql-community-client-5.7.27-1.e################################# [ 75%]
4:mysql-community-server-5.7.27-1.e################################# [100%]
Four 、 To configure MySQL Operating environment
1、 start-up MySQL service
[[email protected] mysql-soft]# systemctl restart mysqld
2、 see MySQL Related files and directories
[[email protected] mysql-soft]# find / -name mysql*
/etc/selinux/targeted/active/modules/100/mysql
/etc/logrotate.d/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/bin/mysql
/usr/lib64/mysql
/usr/share/mysql
# MySQL Configuration file for
[[email protected] mysql-soft]# ll /etc/my.cnf
-rw-r--r--. 1 root root 960 6 month 10 2019 /etc/my.cnf
# MySQL Log file
[[email protected] mysql-soft]# ll /var/log/mysqld.log
-rw-r-----. 1 mysql mysql 3795 6 month 26 19:14 /var/log/mysqld.log
# MySQL Start script for
[[email protected] mysql-soft]# ll /usr/lib/systemd/system/mysqld.service
-rw-r--r--. 1 root root 1614 6 month 10 2019 /usr/lib/systemd/system/mysqld.service
# MySQL The process file for
[[email protected] mysql-soft]# ll /var/run/mysqld/mysqld.pid
-rw-r-----. 1 mysql mysql 5 6 month 26 19:14 /var/run/mysqld/mysqld.pid
# socket file
[[email protected] mysql-soft]# ll /var/lib/mysql/mysql.sock
srwxrwxrwx. 1 mysql mysql 0 6 month 26 19:14 /var/lib/mysql/mysql.sock
3、 see MySQL default root Account password
MySQL After installation , Would be root Account Generate a default password . You can view the default password in the following way .
[[email protected] mysql-soft]# grep 'temporary password' /var/log/mysqld.log
2022-06-26T11:14:04.385266Z 1 [Note] A temporary password is generated for [email protected]: QFh7LiP8-r#c
4、 Log in with the default password MySQL
[[email protected] mysql-soft]# mysql -uroot -pQFh7LiP8-r#c
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.27
Copyright (c) 2000, 2019, 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>
5、 modify root Password of account
mysql> alter user 'root'@'localhost' identified by 'Wgx123456.';
Query OK, 0 rows affected (0.00 sec)
6、 Log in with the new password MySQL
[[email protected] mysql-soft]# mysql -uroot -pWgx123456.
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.27 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, 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>
边栏推荐
- 数据库系统原理与应用教程(004)—— MySQL 安装与配置:重置 MySQL 登录密码(windows 环境)
- Zhou Shaojian, rare
- 苹果自研基带芯片再次失败,说明了华为海思的技术领先性
- 怎么用MySQL语言进行行列装置?
- Golang爬虫框架初探
- [SQL statement] Why do you select two Shanghai and query different counts here? I want it to become a Shanghai, and count only displays a sum
- Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
- 分享在大疆DJI(深圳总部)工作的日常和福利
- Nuxt. JS data prefetching
- Which MySQL functions are currently supported by tablestore in table storage?
猜你喜欢

IM即时通讯开发万人群聊消息投递方案

Embedded development: five revision control best practices

Nuxt.js数据预取

德国iF多项大奖加冕,这副耳机有多强?音珀GTW 270 Hybrid深度评测

怎麼用MySQL語言進行行列裝置?

IM即時通訊開發實現心跳保活遇到的問題

高端程序员上班摸鱼指南

Smart Party Building: faith through time and space | 7.1 dedication

Huawei issued hcsp-solution-5g security talent certification to help build 5g security talent ecosystem

瑞典公布决定排除华为5G设备,但是华为已成功找到新出路
随机推荐
AVL balanced binary search tree
Go 语言源码级调试器 Delve
近半年内连获5家“巨头”投资,这家智能驾驶“黑马”受资本追捧
程序员职业生涯真的很短吗?
Solution to the problem that the keypad light does not light up when starting up
PostgreSQL 存储结构浅析
SQLServer查询: a.id与b.id相同时,a.id对应的a.p在b.id对应的b.p里找不到的话,就显示出这个a.id和a.p
Origin2018 installation and use (sorting)
Huawei issued hcsp-solution-5g security talent certification to help build 5g security talent ecosystem
[daily question] 1175 Prime permutation
Talking from mlperf: how to lead the next wave of AI accelerator
How does go use symmetric encryption?
Origin2018安装与使用(整理中)
Problems encountered in IM instant messaging development to maintain heartbeat
圈铁发音,动感与无噪强强出彩,魔浪HIFIair蓝牙耳机测评
How to adjust the size of computer photos to what you want
怎么用MySQL语言进行行列装置?
DO280管理应用部署--pod调度控制
Guide for high-end programmers to fish at work
高端程序员上班摸鱼指南