当前位置:网站首页>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>
边栏推荐
- Five years after graduation, I became a test development engineer with an annual salary of 30w+
- Go 语言源码级调试器 Delve
- Comment utiliser le langage MySQL pour les appareils de ligne et de ligne?
- DO280管理应用部署--pod调度控制
- When ABAP screen switching, refresh the previous screen
- 【Hot100】20. Valid parentheses
- 【Hot100】19. Delete the penultimate node of the linked list
- How to adjust the size of computer photos to what you want
- 2023 spring recruitment Internship - personal interview process and face-to-face experience sharing
- There will be a gap bug when the search box and button are zoomed
猜你喜欢

【Hot100】20. 有效的括号

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

vscode 查找 替换 一个文件夹下所有文件的数据

苹果自研基带芯片再次失败,说明了华为海思的技术领先性

投稿开奖丨轻量应用服务器征文活动(5月)奖励公布

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

The picgo shortcut is amazing. This person thinks exactly the same as me

Problems encountered in IM instant messaging development to maintain heartbeat

瑞典公布决定排除华为5G设备,但是华为已成功找到新出路
![[nodemon] app crashed - waiting for file changes before starting...解决方法](/img/ee/9830afd86e092851a2a906cb994949.png)
[nodemon] app crashed - waiting for file changes before starting...解决方法
随机推荐
VMware 虚拟机启动时出现故障:VMware Workstation 与 Hyper-v 不兼容...
制造业数字化转型究竟是什么
接口测试框架中的鉴权处理
[IDM] IDM downloader installation
Task. Run(), Task. Factory. Analysis of behavior inconsistency between startnew() and new task()
How to adjust the color of the computer screen and how to change the color of the computer screen
Does 1.5.1 in Seata support mysql8?
Tutorial on principles and applications of database system (004) -- MySQL installation and configuration: resetting MySQL login password (Windows Environment)
数据库系统原理与应用教程(006)—— 编译安装 MySQL5.7(Linux 环境)
Solution to the problem that the keypad light does not light up when starting up
Nuxt. JS data prefetching
ADS算力芯片的多模型架构研究
怎么用MySQL语言进行行列装置?
如何使用phpIPAM来管理IP地址和子网
虚拟串口模拟器和串口调试助手使用教程「建议收藏」
2023 spring recruitment Internship - personal interview process and face-to-face experience sharing
Red team Chapter 10: ColdFusion the difficult process of deserializing WAF to exp to get the target
Embedded development: five revision control best practices
Win11如何设置用户权限?Win11设置用户权限的方法
Principes et applications du système de base de données (006) - - compilation et installation de MySQL 5.7 (environnement Linux)