1-linux下mysql8.0.33安装

news2024/11/18 5:35:45

在互联网企业的日常工作/运维中,我们会经常用到mysql数据库,而linux下mysql的安装方式有三种:

1.mysql rpm安装

2.mysql二进制安装

3.mysql源码安装

今天就为大家讲讲linux下mysql8.0.33版本rpm方式的安装。

1.前提

1.1.系统版本

CentOS7.9.2009

命令:

cat /etc/redhat-release

[root@cent79-2 ~]# cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)
[root@cent79-2 ~]# 

1.2.系统基础配置

参考:

Linux常规基础配置_小黑要上天的博客-CSDN博客

1.3.预安装数据库版本

mysql8.0.33

1.4.环境初始化

# 清除系统原有的MySQL环境
  rm -rf /var/run/yum.pid && yum remove mysql* -y  && yum remove mariadb* -y 
  find / -name mysql -exec rm -rf {} \;
# 删除原有的MySQL包
  for i in `rpm -qa |grep mysql`
  do
  rpm -e --nodeps $i
  done 

2.mysql8.0.33介质下载

2.1.官网地址

官网地址:

https://dev.mysql.com/downloads/mysql/

2.2.安装软件包

命令:

yum install wget tar lrzsz

[root@cent79-2 ~]# yum install wget tar lrzsz
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
CentOS7                                                                | 3.6 kB  00:00:00     
Package 2:tar-1.26-35.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package lrzsz.x86_64 0:0.12.20-36.el7 will be installed
---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================
 Package           Arch               Version                       Repository           Size
==============================================================================================
Installing:
 lrzsz             x86_64             0.12.20-36.el7                CentOS7              78 k
 wget              x86_64             1.14-18.el7_6.1               CentOS7             547 k

Transaction Summary
==============================================================================================
Install  2 Packages

Total download size: 625 k
Installed size: 2.1 M
Is this ok [y/d/N]: y
Downloading packages:
----------------------------------------------------------------------------------------------
Total                                                         380 kB/s | 625 kB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : wget-1.14-18.el7_6.1.x86_64                                                1/2 
  Installing : lrzsz-0.12.20-36.el7.x86_64                                                2/2 
  Verifying  : lrzsz-0.12.20-36.el7.x86_64                                                1/2 
  Verifying  : wget-1.14-18.el7_6.1.x86_64                                                2/2 

Installed:
  lrzsz.x86_64 0:0.12.20-36.el7                 wget.x86_64 0:1.14-18.el7_6.1                

Complete!
[root@cent79-2 ~]# 

命令:

yum install ncurses-devel libaio-devel gcc gcc-c++ numactl libaio glibc cmake autoconf libstdc++.x86_64 libstdc++.i686 bzip2 bison net-tools -y

[root@cent79-2 ~]# yum install ncurses-devel libaio-devel gcc gcc-c++ numactl libaio glibc cmake autoconf libstdc++.x86_64 libstdc++.i686 bzip2 bison net-tools -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package libaio-0.3.109-13.el7.x86_64 already installed and latest version
Package glibc-2.17-317.el7.x86_64 already installed and latest version
Package libstdc++-4.8.5-44.el7.x86_64 already installed and latest version
No package libstdc++.i686 available.
Resolving Dependencies
--> Running transaction check
---> Package autoconf.noarch 0:2.69-11.el7 will be installed
--> Processing Dependency: perl >= 5.006 for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: m4 >= 1.4.14 for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(warnings) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(vars) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(strict) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(constant) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Text::ParseWords) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(POSIX) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(IO::File) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Getopt::Long) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(File::stat) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(File::Spec) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(File::Path) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(File::Find) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(File::Copy) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(File::Compare) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(File::Basename) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Exporter) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Errno) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(DynaLoader) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Data::Dumper) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Cwd) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Class::Struct) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: perl(Carp) for package: autoconf-2.69-11.el7.noarch
--> Processing Dependency: /usr/bin/perl for package: autoconf-2.69-11.el7.noarch
---> Package bison.x86_64 0:3.0.4-2.el7 will be installed
---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
---> Package cmake.x86_64 0:2.8.12.2-2.el7 will be installed
--> Processing Dependency: libarchive.so.13()(64bit) for package: cmake-2.8.12.2-2.el7.x86_64
---> Package gcc.x86_64 0:4.8.5-44.el7 will be installed
--> Processing Dependency: cpp = 4.8.5-44.el7 for package: gcc-4.8.5-44.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-44.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-44.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-44.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-44.el7 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-44.el7 for package: gcc-c++-4.8.5-44.el7.x86_64
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 will be installed
---> Package numactl.x86_64 0:2.0.12-5.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-44.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-317.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-317.el7 for package: glibc-devel-2.17-317.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-317.el7.x86_64
---> Package libarchive.x86_64 0:3.1.2-14.el7_7 will be installed
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-44.el7 will be installed
---> Package m4.x86_64 0:1.4.16-10.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
---> Package perl.x86_64 4:5.16.3-297.el7 will be installed
--> Processing Dependency: perl-libs = 4:5.16.3-297.el7 for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl-macros for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl-libs for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-297.el7.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-297.el7.x86_64
---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
---> Package perl-Getopt-Long.noarch 0:2.40-3.el7 will be installed
--> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-3.el7.noarch
---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
---> Package perl-constant.noarch 0:1.27-2.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-317.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-317.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-317.el7.x86_64
---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
--> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
--> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch
--> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch
---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
---> Package perl-Socket.x86_64 0:2.010-5.el7 will be installed
---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed
---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
---> Package perl-libs.x86_64 4:5.16.3-297.el7 will be installed
---> Package perl-macros.x86_64 4:5.16.3-297.el7 will be installed
---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-1160.el7 will be installed
---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
---> Package perl-Pod-Escapes.noarch 1:1.04-297.el7 will be installed
---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
--> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
--> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
--> Running transaction check
---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
---> Package perl-parent.noarch 1:0.225-244.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================
 Package                      Arch         Version                        Repository     Size
==============================================================================================
Installing:
 autoconf                     noarch       2.69-11.el7                    CentOS7       701 k
 bison                        x86_64       3.0.4-2.el7                    CentOS7       674 k
 bzip2                        x86_64       1.0.6-13.el7                   CentOS7        52 k
 cmake                        x86_64       2.8.12.2-2.el7                 CentOS7       7.1 M
 gcc                          x86_64       4.8.5-44.el7                   CentOS7        16 M
 gcc-c++                      x86_64       4.8.5-44.el7                   CentOS7       7.2 M
 libaio-devel                 x86_64       0.3.109-13.el7                 CentOS7        13 k
 ncurses-devel                x86_64       5.9-14.20130511.el7_4          CentOS7       712 k
 numactl                      x86_64       2.0.12-5.el7                   CentOS7        66 k
Installing for dependencies:
 cpp                          x86_64       4.8.5-44.el7                   CentOS7       5.9 M
 glibc-devel                  x86_64       2.17-317.el7                   CentOS7       1.1 M
 glibc-headers                x86_64       2.17-317.el7                   CentOS7       690 k
 kernel-headers               x86_64       3.10.0-1160.el7                CentOS7       9.0 M
 libarchive                   x86_64       3.1.2-14.el7_7                 CentOS7       319 k
 libmpc                       x86_64       1.0.1-3.el7                    CentOS7        51 k
 libstdc++-devel              x86_64       4.8.5-44.el7                   CentOS7       1.5 M
 m4                           x86_64       1.4.16-10.el7                  CentOS7       256 k
 mpfr                         x86_64       3.1.1-4.el7                    CentOS7       203 k
 perl                         x86_64       4:5.16.3-297.el7               CentOS7       8.0 M
 perl-Carp                    noarch       1.26-244.el7                   CentOS7        19 k
 perl-Data-Dumper             x86_64       2.145-3.el7                    CentOS7        47 k
 perl-Encode                  x86_64       2.51-7.el7                     CentOS7       1.5 M
 perl-Exporter                noarch       5.68-3.el7                     CentOS7        28 k
 perl-File-Path               noarch       2.09-2.el7                     CentOS7        26 k
 perl-File-Temp               noarch       0.23.01-3.el7                  CentOS7        56 k
 perl-Filter                  x86_64       1.49-3.el7                     CentOS7        76 k
 perl-Getopt-Long             noarch       2.40-3.el7                     CentOS7        56 k
 perl-HTTP-Tiny               noarch       0.033-3.el7                    CentOS7        38 k
 perl-PathTools               x86_64       3.40-5.el7                     CentOS7        82 k
 perl-Pod-Escapes             noarch       1:1.04-297.el7                 CentOS7        52 k
 perl-Pod-Perldoc             noarch       3.20-4.el7                     CentOS7        87 k
 perl-Pod-Simple              noarch       1:3.28-4.el7                   CentOS7       216 k
 perl-Pod-Usage               noarch       1.63-3.el7                     CentOS7        27 k
 perl-Scalar-List-Utils       x86_64       1.27-248.el7                   CentOS7        36 k
 perl-Socket                  x86_64       2.010-5.el7                    CentOS7        49 k
 perl-Storable                x86_64       2.45-3.el7                     CentOS7        77 k
 perl-Text-ParseWords         noarch       3.29-4.el7                     CentOS7        14 k
 perl-Time-HiRes              x86_64       4:1.9725-3.el7                 CentOS7        45 k
 perl-Time-Local              noarch       1.2300-2.el7                   CentOS7        24 k
 perl-constant                noarch       1.27-2.el7                     CentOS7        19 k
 perl-libs                    x86_64       4:5.16.3-297.el7               CentOS7       689 k
 perl-macros                  x86_64       4:5.16.3-297.el7               CentOS7        44 k
 perl-parent                  noarch       1:0.225-244.el7                CentOS7        12 k
 perl-podlators               noarch       2.5.1-3.el7                    CentOS7       112 k
 perl-threads                 x86_64       1.87-4.el7                     CentOS7        49 k
 perl-threads-shared          x86_64       1.43-6.el7                     CentOS7        39 k

Transaction Summary
==============================================================================================
Install  9 Packages (+37 Dependent packages)

Total download size: 63 M
Installed size: 155 M
Downloading packages:
----------------------------------------------------------------------------------------------
Total                                                          21 MB/s |  63 MB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : mpfr-3.1.1-4.el7.x86_64                                                   1/46 
  Installing : libmpc-1.0.1-3.el7.x86_64                                                 2/46 
  Installing : m4-1.4.16-10.el7.x86_64                                                   3/46 
  Installing : cpp-4.8.5-44.el7.x86_64                                                   4/46 
  Installing : 1:perl-parent-0.225-244.el7.noarch                                        5/46 
  Installing : perl-HTTP-Tiny-0.033-3.el7.noarch                                         6/46 
  Installing : perl-podlators-2.5.1-3.el7.noarch                                         7/46 
  Installing : perl-Pod-Perldoc-3.20-4.el7.noarch                                        8/46 
  Installing : 1:perl-Pod-Escapes-1.04-297.el7.noarch                                    9/46 
  Installing : perl-Encode-2.51-7.el7.x86_64                                            10/46 
  Installing : perl-Text-ParseWords-3.29-4.el7.noarch                                   11/46 
  Installing : perl-Pod-Usage-1.63-3.el7.noarch                                         12/46 
  Installing : 4:perl-libs-5.16.3-297.el7.x86_64                                        13/46 
  Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                                    14/46 
  Installing : perl-Exporter-5.68-3.el7.noarch                                          15/46 
  Installing : perl-constant-1.27-2.el7.noarch                                          16/46 
  Installing : perl-threads-1.87-4.el7.x86_64                                           17/46 
  Installing : perl-Socket-2.010-5.el7.x86_64                                           18/46 
  Installing : perl-Time-Local-1.2300-2.el7.noarch                                      19/46 
  Installing : perl-Carp-1.26-244.el7.noarch                                            20/46 
  Installing : perl-Storable-2.45-3.el7.x86_64                                          21/46 
  Installing : perl-threads-shared-1.43-6.el7.x86_64                                    22/46 
  Installing : perl-PathTools-3.40-5.el7.x86_64                                         23/46 
  Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64                               24/46 
  Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch                                      25/46 
  Installing : perl-File-Temp-0.23.01-3.el7.noarch                                      26/46 
  Installing : perl-File-Path-2.09-2.el7.noarch                                         27/46 
  Installing : perl-Filter-1.49-3.el7.x86_64                                            28/46 
  Installing : 4:perl-macros-5.16.3-297.el7.x86_64                                      29/46 
  Installing : perl-Getopt-Long-2.40-3.el7.noarch                                       30/46 
  Installing : 4:perl-5.16.3-297.el7.x86_64                                             31/46 
  Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                      32/46 
  Installing : libarchive-3.1.2-14.el7_7.x86_64                                         33/46 
  Installing : libstdc++-devel-4.8.5-44.el7.x86_64                                      34/46 
  Installing : kernel-headers-3.10.0-1160.el7.x86_64                                    35/46 
  Installing : glibc-headers-2.17-317.el7.x86_64                                        36/46 
  Installing : glibc-devel-2.17-317.el7.x86_64                                          37/46 
  Installing : gcc-4.8.5-44.el7.x86_64                                                  38/46 
  Installing : gcc-c++-4.8.5-44.el7.x86_64                                              39/46 
  Installing : cmake-2.8.12.2-2.el7.x86_64                                              40/46 
  Installing : autoconf-2.69-11.el7.noarch                                              41/46 
  Installing : bison-3.0.4-2.el7.x86_64                                                 42/46 
  Installing : numactl-2.0.12-5.el7.x86_64                                              43/46 
  Installing : libaio-devel-0.3.109-13.el7.x86_64                                       44/46 
  Installing : ncurses-devel-5.9-14.20130511.el7_4.x86_64                               45/46 
  Installing : bzip2-1.0.6-13.el7.x86_64                                                46/46 
  Verifying  : perl-HTTP-Tiny-0.033-3.el7.noarch                                         1/46 
  Verifying  : gcc-c++-4.8.5-44.el7.x86_64                                               2/46 
  Verifying  : kernel-headers-3.10.0-1160.el7.x86_64                                     3/46 
  Verifying  : perl-threads-shared-1.43-6.el7.x86_64                                     4/46 
  Verifying  : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                                     5/46 
  Verifying  : 4:perl-libs-5.16.3-297.el7.x86_64                                         6/46 
  Verifying  : mpfr-3.1.1-4.el7.x86_64                                                   7/46 
  Verifying  : perl-Exporter-5.68-3.el7.noarch                                           8/46 
  Verifying  : perl-constant-1.27-2.el7.noarch                                           9/46 
  Verifying  : perl-PathTools-3.40-5.el7.x86_64                                         10/46 
  Verifying  : perl-threads-1.87-4.el7.x86_64                                           11/46 
  Verifying  : m4-1.4.16-10.el7.x86_64                                                  12/46 
  Verifying  : perl-Socket-2.010-5.el7.x86_64                                           13/46 
  Verifying  : 1:perl-parent-0.225-244.el7.noarch                                       14/46 
  Verifying  : bzip2-1.0.6-13.el7.x86_64                                                15/46 
  Verifying  : 1:perl-Pod-Escapes-1.04-297.el7.noarch                                   16/46 
  Verifying  : ncurses-devel-5.9-14.20130511.el7_4.x86_64                               17/46 
  Verifying  : cpp-4.8.5-44.el7.x86_64                                                  18/46 
  Verifying  : 1:perl-Pod-Simple-3.28-4.el7.noarch                                      19/46 
  Verifying  : perl-Time-Local-1.2300-2.el7.noarch                                      20/46 
  Verifying  : libstdc++-devel-4.8.5-44.el7.x86_64                                      21/46 
  Verifying  : perl-Carp-1.26-244.el7.noarch                                            22/46 
  Verifying  : libarchive-3.1.2-14.el7_7.x86_64                                         23/46 
  Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                      24/46 
  Verifying  : glibc-headers-2.17-317.el7.x86_64                                        25/46 
  Verifying  : perl-Storable-2.45-3.el7.x86_64                                          26/46 
  Verifying  : gcc-4.8.5-44.el7.x86_64                                                  27/46 
  Verifying  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                               28/46 
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                       29/46 
  Verifying  : libmpc-1.0.1-3.el7.x86_64                                                30/46 
  Verifying  : perl-File-Temp-0.23.01-3.el7.noarch                                      31/46 
  Verifying  : numactl-2.0.12-5.el7.x86_64                                              32/46 
  Verifying  : perl-Pod-Usage-1.63-3.el7.noarch                                         33/46 
  Verifying  : perl-Encode-2.51-7.el7.x86_64                                            34/46 
  Verifying  : glibc-devel-2.17-317.el7.x86_64                                          35/46 
  Verifying  : bison-3.0.4-2.el7.x86_64                                                 36/46 
  Verifying  : perl-Pod-Perldoc-3.20-4.el7.noarch                                       37/46 
  Verifying  : perl-podlators-2.5.1-3.el7.noarch                                        38/46 
  Verifying  : autoconf-2.69-11.el7.noarch                                              39/46 
  Verifying  : perl-File-Path-2.09-2.el7.noarch                                         40/46 
  Verifying  : cmake-2.8.12.2-2.el7.x86_64                                              41/46 
  Verifying  : perl-Filter-1.49-3.el7.x86_64                                            42/46 
  Verifying  : perl-Getopt-Long-2.40-3.el7.noarch                                       43/46 
  Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                                   44/46 
  Verifying  : 4:perl-5.16.3-297.el7.x86_64                                             45/46 
  Verifying  : 4:perl-macros-5.16.3-297.el7.x86_64                                      46/46 

Installed:
  autoconf.noarch 0:2.69-11.el7             bison.x86_64 0:3.0.4-2.el7                       
  bzip2.x86_64 0:1.0.6-13.el7               cmake.x86_64 0:2.8.12.2-2.el7                    
  gcc.x86_64 0:4.8.5-44.el7                 gcc-c++.x86_64 0:4.8.5-44.el7                    
  libaio-devel.x86_64 0:0.3.109-13.el7      ncurses-devel.x86_64 0:5.9-14.20130511.el7_4     
  numactl.x86_64 0:2.0.12-5.el7            

Dependency Installed:
  cpp.x86_64 0:4.8.5-44.el7                       glibc-devel.x86_64 0:2.17-317.el7          
  glibc-headers.x86_64 0:2.17-317.el7             kernel-headers.x86_64 0:3.10.0-1160.el7    
  libarchive.x86_64 0:3.1.2-14.el7_7              libmpc.x86_64 0:1.0.1-3.el7                
  libstdc++-devel.x86_64 0:4.8.5-44.el7           m4.x86_64 0:1.4.16-10.el7                  
  mpfr.x86_64 0:3.1.1-4.el7                       perl.x86_64 4:5.16.3-297.el7               
  perl-Carp.noarch 0:1.26-244.el7                 perl-Data-Dumper.x86_64 0:2.145-3.el7      
  perl-Encode.x86_64 0:2.51-7.el7                 perl-Exporter.noarch 0:5.68-3.el7          
  perl-File-Path.noarch 0:2.09-2.el7              perl-File-Temp.noarch 0:0.23.01-3.el7      
  perl-Filter.x86_64 0:1.49-3.el7                 perl-Getopt-Long.noarch 0:2.40-3.el7       
  perl-HTTP-Tiny.noarch 0:0.033-3.el7             perl-PathTools.x86_64 0:3.40-5.el7         
  perl-Pod-Escapes.noarch 1:1.04-297.el7          perl-Pod-Perldoc.noarch 0:3.20-4.el7       
  perl-Pod-Simple.noarch 1:3.28-4.el7             perl-Pod-Usage.noarch 0:1.63-3.el7         
  perl-Scalar-List-Utils.x86_64 0:1.27-248.el7    perl-Socket.x86_64 0:2.010-5.el7           
  perl-Storable.x86_64 0:2.45-3.el7               perl-Text-ParseWords.noarch 0:3.29-4.el7   
  perl-Time-HiRes.x86_64 4:1.9725-3.el7           perl-Time-Local.noarch 0:1.2300-2.el7      
  perl-constant.noarch 0:1.27-2.el7               perl-libs.x86_64 4:5.16.3-297.el7          
  perl-macros.x86_64 4:5.16.3-297.el7             perl-parent.noarch 1:0.225-244.el7         
  perl-podlators.noarch 0:2.5.1-3.el7             perl-threads.x86_64 0:1.87-4.el7           
  perl-threads-shared.x86_64 0:1.43-6.el7        

Complete!
[root@cent79-2 ~]# 

2.3.mysql8.0.33介质下载

命令:

cd /root
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.33-1.el7.x86_64.rpm-bundle.tar

[root@cent79-2 ~]# cd /root
[root@cent79-2 ~]# wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.33-1.el7.x86_64.rpm-bundle.tar
--2023-07-11 15:12:14--  https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.33-1.el7.x86_64.rpm-bundle.tar
Resolving cdn.mysql.com (cdn.mysql.com)... 23.41.161.20
Connecting to cdn.mysql.com (cdn.mysql.com)|23.41.161.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1027983360 (980M) [application/x-tar]
Saving to: ‘mysql-8.0.33-1.el7.x86_64.rpm-bundle.tar’

 0% [                                                     ] 7,162,447   2.61MB/s             
[root@cent79-2 ~]# 
[root@cent79-2 ~]# ls
anaconda-ks.cfg  mysql-8.0.33-1.el7.x86_64.rpm-bundle.tar
[root@cent79-2 ~]# 

2.4.mysql8.0.33安装

2.4.1.解压mysql8.0.33介质

命令:

tar -xvf mysql-8.0.33-1.el7.x86_64.rpm-bundle.tar

[root@cent79-2 ~]# tar -xvf mysql-8.0.33-1.el7.x86_64.rpm-bundle.tar 
mysql-community-client-8.0.33-1.el7.x86_64.rpm
mysql-community-client-plugins-8.0.33-1.el7.x86_64.rpm
mysql-community-common-8.0.33-1.el7.x86_64.rpm
mysql-community-debuginfo-8.0.33-1.el7.x86_64.rpm
mysql-community-devel-8.0.33-1.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.33-1.el7.x86_64.rpm
mysql-community-icu-data-files-8.0.33-1.el7.x86_64.rpm
mysql-community-libs-8.0.33-1.el7.x86_64.rpm
mysql-community-libs-compat-8.0.33-1.el7.x86_64.rpm
mysql-community-server-8.0.33-1.el7.x86_64.rpm
mysql-community-server-debug-8.0.33-1.el7.x86_64.rpm
mysql-community-test-8.0.33-1.el7.x86_64.rpm
[root@cent79-2 ~]# ls
anaconda-ks.cfg
mysql-8.0.33-1.el7.x86_64.rpm-bundle.tar
mysql-community-client-8.0.33-1.el7.x86_64.rpm
mysql-community-client-plugins-8.0.33-1.el7.x86_64.rpm
mysql-community-common-8.0.33-1.el7.x86_64.rpm
mysql-community-debuginfo-8.0.33-1.el7.x86_64.rpm
mysql-community-devel-8.0.33-1.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.33-1.el7.x86_64.rpm
mysql-community-icu-data-files-8.0.33-1.el7.x86_64.rpm
mysql-community-libs-8.0.33-1.el7.x86_64.rpm
mysql-community-libs-compat-8.0.33-1.el7.x86_64.rpm
mysql-community-server-8.0.33-1.el7.x86_64.rpm
mysql-community-server-debug-8.0.33-1.el7.x86_64.rpm
mysql-community-test-8.0.33-1.el7.x86_64.rpm
[root@cent79-2 ~]# 

2.4.2.mysql8.0.33安装

命令(安装顺序一定不能变):

rpm -ivh --nodeps --force mysql-community-common-8.0.33-1.el7.x86_64.rpm
rpm -ivh --nodeps --force mysql-community-libs-8.0.33-1.el7.x86_64.rpm      
rpm -ivh --nodeps --force mysql-community-client-8.0.33-1.el7.x86_64.rpm 
rpm -ivh --nodeps --force mysql-community-server-8.0.33-1.el7.x86_64.rpm

[root@cent79-2 ~]# rpm -ivh --nodeps --force mysql-community-common-8.0.33-1.el7.x86_64.rpm
warning: mysql-community-common-8.0.33-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-common-8.0.33-1.e################################# [100%]
[root@cent79-2 ~]# rpm -ivh --nodeps --force mysql-community-libs-8.0.33-1.el7.x86_64.rpm
warning: mysql-community-libs-8.0.33-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-libs-8.0.33-1.el7################################# [100%]
[root@cent79-2 ~]# rpm -ivh --nodeps --force mysql-community-client-8.0.33-1.el7.x86_64.rpm
warning: mysql-community-client-8.0.33-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-client-8.0.33-1.e################################# [100%]
[root@cent79-2 ~]# rpm -ivh --nodeps --force mysql-community-server-8.0.33-1.el7.x86_64.rpm
warning: mysql-community-server-8.0.33-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-server-8.0.33-1.e################################# [100%]
[root@cent79-2 ~]# 
[root@cent79-2 ~]# 

2.4.3.mysql安装后确认

mysql8.0.33默认安装在/var/lib/mysql目录,且会默认创建mysql用户

rpm -qa |grep mysql

cd /var/lib

ls -ld mysql*

cat /etc/passwd |grep mysql

[root@cent79-2 mysql]# rpm -qa |grep mysql
mysql-community-libs-8.0.33-1.el7.x86_64
mysql-community-server-8.0.33-1.el7.x86_64
mysql-community-common-8.0.33-1.el7.x86_64
mysql-community-client-8.0.33-1.el7.x86_64
[root@cent79-2 mysql]# 
[root@cent79-2 lib]# cd /var/lib/
[root@cent79-2 lib]# ls -ld mysql*
drwxr-x--x 2 mysql mysql 6 Mar 17 02:51 mysql
drwxr-x--- 2 mysql mysql 6 Mar 17 02:51 mysql-files
drwxr-x--- 2 mysql mysql 6 Mar 17 02:51 mysql-keyring
[root@cent79-2 lib]# cat /etc/passwd |grep mysql
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/false
[root@cent79-2 lib]# 

2.4.4.启动mysql

命令:

systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld

cd /var/lib/mysql

ls -l

[root@cent79-2 lib]# systemctl start mysqld
[root@cent79-2 lib]# systemctl enable mysqld
[root@cent79-2 lib]# systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2023-07-11 15:29:51 CST; 10s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
 Main PID: 1966 (mysqld)
   Status: "Server is operational"
   CGroup: /system.slice/mysqld.service
           └─1966 /usr/sbin/mysqld

Jul 11 15:29:39 cent79-2 systemd[1]: Starting MySQL Server...
Jul 11 15:29:51 cent79-2 systemd[1]: Started MySQL Server.
[root@cent79-2 lib]# cd mysql
[root@cent79-2 mysql]# ls
auto.cnf       client-cert.pem    ibdata1       mysql.ibd           public_key.pem   undo_002
binlog.000001  client-key.pem     ibtmp1        mysql.sock          server-cert.pem
binlog.index   #ib_16384_0.dblwr  #innodb_redo  mysql.sock.lock     server-key.pem
ca-key.pem     #ib_16384_1.dblwr  #innodb_temp  performance_schema  sys
ca.pem         ib_buffer_pool     mysql         private_key.pem     undo_001
[root@cent79-2 mysql]# ls -l
total 90568
-rw-r----- 1 mysql mysql       56 Jul 11 15:29 auto.cnf
-rw-r----- 1 mysql mysql      157 Jul 11 15:29 binlog.000001
-rw-r----- 1 mysql mysql       16 Jul 11 15:29 binlog.index
-rw------- 1 mysql mysql     1676 Jul 11 15:29 ca-key.pem
-rw-r--r-- 1 mysql mysql     1112 Jul 11 15:29 ca.pem
-rw-r--r-- 1 mysql mysql     1112 Jul 11 15:29 client-cert.pem
-rw------- 1 mysql mysql     1676 Jul 11 15:29 client-key.pem
-rw-r----- 1 mysql mysql   196608 Jul 11 15:29 #ib_16384_0.dblwr
-rw-r----- 1 mysql mysql  8585216 Jul 11 15:29 #ib_16384_1.dblwr
-rw-r----- 1 mysql mysql     5985 Jul 11 15:29 ib_buffer_pool
-rw-r----- 1 mysql mysql 12582912 Jul 11 15:29 ibdata1
-rw-r----- 1 mysql mysql 12582912 Jul 11 15:29 ibtmp1
drwxr-x--- 2 mysql mysql     4096 Jul 11 15:29 #innodb_redo
drwxr-x--- 2 mysql mysql      187 Jul 11 15:29 #innodb_temp
drwxr-x--- 2 mysql mysql      143 Jul 11 15:29 mysql
-rw-r----- 1 mysql mysql 25165824 Jul 11 15:29 mysql.ibd
srwxrwxrwx 1 mysql mysql        0 Jul 11 15:29 mysql.sock
-rw------- 1 mysql mysql        5 Jul 11 15:29 mysql.sock.lock
drwxr-x--- 2 mysql mysql     8192 Jul 11 15:29 performance_schema
-rw------- 1 mysql mysql     1676 Jul 11 15:29 private_key.pem
-rw-r--r-- 1 mysql mysql      452 Jul 11 15:29 public_key.pem
-rw-r--r-- 1 mysql mysql     1112 Jul 11 15:29 server-cert.pem
-rw------- 1 mysql mysql     1676 Jul 11 15:29 server-key.pem
drwxr-x--- 2 mysql mysql       28 Jul 11 15:29 sys
-rw-r----- 1 mysql mysql 16777216 Jul 11 15:29 undo_001
-rw-r----- 1 mysql mysql 16777216 Jul 11 15:29 undo_002
[root@cent79-2 mysql]# 

2.4.5.修改mysql密码

命令:

grep "password" /var/log/mysqld.log                                                               --查找初始密码
/usr/bin/mysqladmin -uroot -p'${old_passwd}' password '${new_passwd}'    --修改mysql密码

[root@cent79-2 log]# grep "password" /var/log/mysqld.log
2023-07-11T07:29:44.693012Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: J%LdHu9HRse4
[root@cent79-2 log]# 
[root@cent79-2 log]# /usr/bin/mysqladmin -uroot -p'J%LdHu9HRse4' password 'Root2#admin'
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
[root@cent79-2 log]# 

2.4.6.mysql登录验证

命令:

mysql -uroot -pRoot2#admin

[root@cent79-2 log]# mysql -uroot -pRoot2#admin
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 10
Server version: 8.0.33 MySQL Community Server - GPL

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

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> 

2.4.7.mysql用户root密码更改

命令:

show variables like '%valid%';

mysql> show variables like '%valid%';
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| innodb_validate_tablespace_paths     | ON     |
| validate_password.check_user_name    | ON     |
| validate_password.dictionary_file    |        |
| validate_password.length             | 8      |
| validate_password.mixed_case_count   | 1      |
| validate_password.number_count       | 1      |
| validate_password.policy             | MEDIUM |
| validate_password.special_char_count | 1      |
+--------------------------------------+--------+
8 rows in set (0.00 sec)
mysql>

命令:

set global validate_password.check_user_name=OFF;

set global validate_password.policy=0;

set global validate_password.length=4;

flush privileges;

show variables like '%valid%';

mysql> set global validate_password.check_user_name=OFF;
Query OK, 0 rows affected (0.01 sec)

mysql> set global validate_password.policy=0; 
Query OK, 0 rows affected (0.00 sec)

mysql> set global validate_password.length=4;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> show variables like '%valid%';
+--------------------------------------+-------+
| Variable_name                        | Value |
+--------------------------------------+-------+
| innodb_validate_tablespace_paths     | ON    |
| validate_password.check_user_name    | OFF   |
| validate_password.dictionary_file    |       |
| validate_password.length             | 4     |
| validate_password.mixed_case_count   | 1     |
| validate_password.number_count       | 1     |
| validate_password.policy             | LOW   |
| validate_password.special_char_count | 1     |
+--------------------------------------+-------+
8 rows in set (0.00 sec)




命令:

update user set authentication_string='' where user='root';
alter user 'root'@'localhost' identified with mysql_native_password by 'root';
flush privileges;
 

mysql> update user set authentication_string='' where user='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'root';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

退出验证:

命令:

exit

mysql -uroot -proot

mysql> exit
Bye
[root@cent79-2 log]# mysql -uroot -pRoot2#admin
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@cent79-2 log]# mysql -uroot -proot
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 12
Server version: 8.0.33 MySQL Community Server - GPL

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

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> 

2.4.8.创建可登录的远程登录用户

命令:

create user 'root'@'%' identified with mysql_native_password by '${password};   --创建可登录的远程登录用户
grant all privileges on *.* to root@'%';                                                                           --授权
flush privileges;                                                                                                                --刷新

select host,user,plugin,authentication_string from mysql.user;

mysql> create user 'root'@'%' identified with mysql_native_password by 'root';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on *.* to root@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user,plugin,authentication_string from mysql.user;
+-----------+------------------+-----------------------+------------------------------------------------------------------------+
| host      | user             | plugin                | authentication_string                                                  |
+-----------+------------------+-----------------------+------------------------------------------------------------------------+
| %         | root             | mysql_native_password | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B                              |
| localhost | mysql.infoschema | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.session    | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.sys        | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | root             | mysql_native_password | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B                              |
+-----------+------------------+-----------------------+------------------------------------------------------------------------+
5 rows in set (0.00 sec)

mysql> 

Navicat远程连接验证:

 至此,linux下mysql8.0.33安装已经完成。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/814007.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

目标识别数据集互相转换——xml、txt、json数据格式互转

VOC数据格式与YOLO数据格式互转 1.VOC数据格式 VOC(Visual Object Classes)是一个常用的计算机视觉数据集,它主要用于对象检测、分类和分割任务。VOC的标注格式,也被许多其他的数据集采用,因此理解这个数据格式是很重…

Pytest+Allure+Excel接口自动化测试框架实战

1. Allure 简介 简介 Allure 框架是一个灵活的、轻量级的、支持多语言的测试报告工具,它不仅以 Web 的方式展示了简介的测试结果,而且允许参与开发过程的每个人可以从日常执行的测试中,最大限度地提取有用信息。 Allure 是由 Java 语言开发…

C#文件操作从入门到精通(1)——INI文件操作

点击这里:微软官方文档查看writePrivateProfileString函数定义 常见错误: 1、中文路径写入失败,为啥? 2、文件不是全路径,只有文件名也会写入失败: 3、GetLastError怎么使用? GetLastError错误代码含义: (0)-操作成功完成。 (1)-功能错误。 (2)- 系统找不到指定的文件…

62 # 借用 promise 写成类的方法

新建 62 文件夹&#xff0c;里面添加三个文件 index.html <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><tit…

在周末,找回属于自己的时间~

&#x1f3c6;作者简介&#xff0c;黑夜开发者&#xff0c;全栈领域新星创作者✌&#xff0c;2023年6月csdn上海赛道top4。 &#x1f466;&#x1f3fb;个人主页 &#xff1a; 点击这里 &#x1f4bb;推荐专栏1&#xff1a;PHP面试题专区&#xff08;2023&#xff09; PHP入门基…

【深度学习】Inst-Inpaint: Instructing to Remove Objects with Diffusion Models,指令式图像修复

论文&#xff1a;https://arxiv.org/abs/2304.03246 code:http://instinpaint.abyildirim.com/ 文章目录 AbstractIntroductionRelated WorkDataset GenerationMethodPS Abstract 图像修复任务是指从图像中擦除不需要的像素&#xff0c;并以语义一致且逼真的方式填充它们。传统…

C++基础知识 (引用)

⭐️ 往期相关文章 ✨ 链接&#xff1a;C基础知识&#xff08;命名空间、输入输出、函数的缺省参数、函数重载&#xff09; ⭐️ 引用 引用从语法的层面上讲&#xff1a;引用不是定义一个新的变量&#xff0c;而是给已存在的变量取了一个别名&#xff0c;编译器不会为引用变…

黑马大数据学习笔记3-MapReduce配置和YARN部署以及基本命令

目录 部署说明MapReduce配置文件YARN配置文件分发配置文件集群启动命令开始启动YARN集群 查看YARN的WEB UI页面保存快照YARN集群的启停命令一键启动脚本单进程启停 提交MapReduce任务到YARN执行提交wordcount示例程序查看运行日志提交求圆周率示例程序 p41~43 https://www.bili…

无线温湿度信息中继器模块的组成和工作状态及编程与组网建议

在无线温湿度信息收集系统中&#xff0c;信息中继器模块是连接终端信息点与互联网的重要节点。本文将详细介绍该模块的组成和工作状态&#xff0c;并给出编程和组网的建议。 一、组成 该无线温湿度信息中继器模块由以下几个核心组成部分构成&#xff1a; STM32F103ZET6主控芯片…

17- C++ const和异常-5 (C++)

第六章 C对C的拓展2 6.1 const详解 6.1.1 const 修饰普通变量 被修饰的对象是只读的 const int a; //a的值是只读的 int const a; const int * p; 该语句表示指向整形常量的 指针&#xff0c;它指向的值不能修改。 int const * p; 该语句与b的含义相同&#xff0c;表…

adobe ps beta的使用方法

1、人物换发型。 1&#xff09;套索套选出来相关的头发。 2&#xff09;点击生成&#xff0c;输入“red hair” 按“生成”键。 2、人物换眼睛。 1&#xff09;套索套选出来相关的眼睛区域&#xff0c;大一点范围。 2&#xff09;点击生成&#xff0c;输入“blue eyes"…

【Golang 接口自动化03】 解析接口返回XML

目录 解析接口返回数据 定义结构体 解析函数&#xff1a; 测试 优化 资料获取方法 上一篇我们学习了怎么发送各种数据类型的http请求&#xff0c;这一篇我们来介绍怎么来解析接口返回的XML的数据。 解析接口返回数据 定义结构体 假设我们现在有一个接口返回的数据resp如…

分布式软件架构——内容分发网络

内容分发网络&#xff08;CDN&#xff0c;Content Distribution Network或Content Delivery Network&#xff09; 其基本思路是尽可能避开互联网上有可能影响数据传输速度和稳定性的瓶颈和环节&#xff0c;使内容传输得更快、更稳定。通过在网络各处放置节点服务器所构成的在现…

【数据结构与算法】归并排序

归并排序 归并排序&#xff08;MERGE-SORT&#xff09;是利用归并的思想实现的排序方法&#xff0c;该算法采用经典的分治&#xff08;divide-and-conquer&#xff09;策略&#xff08;分治法将问题分&#xff08;divide&#xff09;成一些小的问题然后递归求解&#xff0c;而…

LaTex语法(常用数学符号的语法和注意事项)

说明:[]括号表示把语法括起来&#xff0c;并不表示LaTex语法。 1. 求和符号(Σ) 这个符号的基本语法为&#xff1a;[\sum_{}^{}]。 符号有两种模式&#xff1a;内联数学模式(inside math mode)和显示数学模式(displayed math mode)。 内联数学模式&#xff1a;排版时使用各…

CAN通信的位定时与同步

位定时与同步 1.位时间 1.1相关基本概念 1&#xff09;系统时钟&#xff1a;记为 t c l k t_{clk} tclk​&#xff1b; 2&#xff09;CAN时钟周期&#xff1a;CAN时钟是由系统时钟分频而来的一个时间长度值&#xff0c;表示CAN控制器的工作时钟&#xff0c;实际上就是一个时…

【前端知识】React 基础巩固(四十二)——React Hooks的介绍

React 基础巩固(四十二)——React Hooks的介绍 一、为什么需要Hook? Hook 是 React 16.8 的新增特性&#xff0c;它可以让我们在不编写class的情况下使用state以及其他的React特性&#xff08;比如生命周期&#xff09;。 class组件 VS 函数式组件&#xff1a; class的优势…

C语言每日一题:9.《数据结构》链表的中间节点+链表的倒数第k个节点。

第一题&#xff1a; 题目链接&#xff1a; >思路一&#xff1a; 1.第一遍遍历链表&#xff0c;直到找到尾结束第一次遍历&#xff0c;遍历的过程中记录链表长度。定义长度为k。 2.确定中间是第几个节点&#xff0c;计算是k/21根据题目要求。 3.再一次去遍历我们的数组&…

iOS开发-格式化时间显示刚刚几分钟前几小时前等

iOS开发-格式化时间显示刚刚几分钟前几小时前等 在开发中经常遇到从服务端获取的时间戳&#xff0c;需要转换显示刚刚、几分钟前、几小时前、几天前、年月日等格式。 主要用到了NSCalendar、NSDateComponents这两个类 NSString *result nil;NSCalendarUnit components (NSC…

minGPT 代码详解(训练 GPT 模型执行两位数加法)

文章目录 1. MinGPT 项目简介2. 相关论文2.1 GPT-12.2 GPT-22.3 GPT-3 3. 代码详解3.1 项目结构3.2 GPT 模型代码详解3.2.1 Transformer block3.2.2 GPT 3.3 两位数加法实验3.3.1 数据集构造3.3.2 训练器3.3.3 模型参数设置3.3.4 训练过程 1. MinGPT 项目简介 MinGPT 是 GPT 模…