当前位置:网站首页>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>
边栏推荐
- vscode 查找 替换 一个文件夹下所有文件的数据
- 【Hot100】20. 有效的括号
- 使用腾讯云搭建图床服务
- Sqlserver query: when a.id is the same as b.id, and the A.P corresponding to a.id cannot be found in the B.P corresponding to b.id, the a.id and A.P will be displayed
- 制造业数字化转型究竟是什么
- [open source data] open source data set for cross modal (MRI, Meg, eye movement) human spatial memory research based on virtual reality scenes
- 分享在大疆DJI(深圳总部)工作的日常和福利
- MLPerf Training v2.0 榜单发布,在同等GPU配置下百度飞桨性能世界第一
- Principle of motion capture system
- Origin2018 installation and use (sorting)
猜你喜欢

数据库系统原理与应用教程(004)—— MySQL 安装与配置:重置 MySQL 登录密码(windows 环境)
![[open source data] open source data set for cross modal (MRI, Meg, eye movement) human spatial memory research based on virtual reality scenes](/img/73/98e4847783be26d86d147425ce3ecd.jpg)
[open source data] open source data set for cross modal (MRI, Meg, eye movement) human spatial memory research based on virtual reality scenes

Use Tencent cloud to build a map bed service

Malaysia's Star: Sun Yuchen is still adhering to the dream of digital economy in WTO MC12

Principle of motion capture system

Nuxt.js数据预取

Embedded development: five revision control best practices

数据库系统原理与应用教程(002)—— MySQL 安装与配置:MySQL 软件的卸载(windows 环境)

芯片供应转向过剩,中国芯片日产增加至10亿,国外芯片将更难受

揭秘慕思“智商税”:狂砸40亿搞营销,发明专利仅7项
随机推荐
C#/VB. Net merge PDF document
Summer Challenge harmonyos canvas realize clock
普通二本,去过阿里外包,到现在年薪40W+的高级测试工程师,我的两年转行心酸经历...
Pico,是要拯救还是带偏消费级VR?
idea启动Command line is too long问题处理
What is the digital transformation of manufacturing industry
Win11如何设置用户权限?Win11设置用户权限的方法
Problèmes rencontrés dans le développement de la GI pour maintenir le rythme cardiaque en vie
The Department came to a Post-00 test paper king who took out 25K. The veteran said it was really dry, but it had been
Origin2018安装与使用(整理中)
Microservice tracking SQL (support Gorm query tracking under isto control)
When ABAP screen switching, refresh the previous screen
How to use phpipam to manage IP addresses and subnets
How to adjust the size of computer photos to what you want
【Hot100】19. 删除链表的倒数第 N 个结点
Guide for high-end programmers to fish at work
July 1, 2022 Daily: Google's new research: Minerva, using language models to solve quantitative reasoning problems
IM即时通讯开发万人群聊消息投递方案
Five years after graduation, I became a test development engineer with an annual salary of 30w+
Zabbix2.2监控之系统及应用日志监控报警