当前位置:网站首页>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>
边栏推荐
- VMware 虚拟机启动时出现故障:VMware Workstation 与 Hyper-v 不兼容...
- Research on multi model architecture of ads computing power chip
- Programming examples of stm32f1 and stm32subeide - production melody of PWM driven buzzer
- [IDM] IDM downloader installation
- Im instant messaging develops a message delivery scheme for 10000 people
- Apple's self-developed baseband chip failed again, which shows Huawei Hisilicon's technological leadership
- Five years after graduation, I became a test development engineer with an annual salary of 30w+
- Preliminary study on golang crawler framework
- 揭秘慕思“智商税”:狂砸40亿搞营销,发明专利仅7项
- 德国iF多项大奖加冕,这副耳机有多强?音珀GTW 270 Hybrid深度评测
猜你喜欢
【Hot100】17. Letter combination of telephone number
Zhou Shaojian, rare
MLPerf Training v2.0 榜单发布,在同等GPU配置下百度飞桨性能世界第一
【Hot100】20. 有效的括号
PostgreSQL 存储结构浅析
投稿开奖丨轻量应用服务器征文活动(5月)奖励公布
Use Tencent cloud to build a map bed service
Go language learning notes - Gorm use - table addition, deletion, modification and query | web framework gin (VIII)
芯片供应转向过剩,中国芯片日产增加至10亿,国外芯片将更难受
How to adjust the size of computer photos to what you want
随机推荐
瑞典公布决定排除华为5G设备,但是华为已成功找到新出路
FPN网络详解
The sharp drop in electricity consumption in Guangdong shows that the substitution of high-tech industries for high-energy consumption industries has achieved preliminary results
Use Tencent cloud to build a map bed service
近半年内连获5家“巨头”投资,这家智能驾驶“黑马”受资本追捧
Go language source level debugger delve
Win11如何設置用戶權限?Win11設置用戶權限的方法
【Hot100】17. 电话号码的字母组合
Motion capture system for apple picking robot
【LeetCode】43. String multiplication
Task. Run(), Task. Factory. Analysis of behavior inconsistency between startnew() and new task()
2023届春招实习-个人面试过程和面经分享
制造业数字化转型究竟是什么
全面看待企业数字化转型的价值
How to adjust the size of computer photos to what you want
揭秘慕思“智商税”:狂砸40亿搞营销,发明专利仅7项
laravel的模型删除后动作
【Hot100】19. Delete the penultimate node of the linked list
[IDM] IDM downloader installation
Do280 management application deployment - pod scheduling control