赞
踩
9de7bb31d0644e7393039222babfed10
以上的几种安装方式(二进制,源码,安装包)都需要下载源码,二进制文件,安装包等,适用于服务器不能连接互联网的场景。
docker镜像安装能联网则可以直接拉镜像,不能联网可以先下载镜像再导入。
现在简略记录下如何使用官方源安装, 这种方式服务器必须能够联网。
https://dev.mysql.com/downloads/
点击 MySQL Yum Repository 进入到下载页面
可以下载rpm包,然后安装。
也可以直接yum安装这个源包。
我们右键复制可以得到地址为
https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm
如下就把源安装上去了。装完了在yum配置目录/etc/yum.repos.d/下多了3个文件。后面的MySQL就是从这里下载安装包。
[root@localhost ~]# yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm Loaded plugins: fastestmirror mysql80-community-release-el7-7.noarch.rpm | 11 kB 00:00:00 Examining /var/tmp/yum-root-3wTq5S/mysql80-community-release-el7-7.noarch.rpm: mysql80-community-release-el7-7.noarch Marking /var/tmp/yum-root-3wTq5S/mysql80-community-release-el7-7.noarch.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package mysql80-community-release.noarch 0:el7-7 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================================== Installing: mysql80-community-release noarch el7-7 /mysql80-community-release-el7-7.noarch 10 k Transaction Summary =================================================================================================================================================== Install 1 Package Total size: 10 k Installed size: 10 k Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mysql80-community-release-el7-7.noarch 1/1 Verifying : mysql80-community-release-el7-7.noarch 1/1 Installed: mysql80-community-release.noarch 0:el7-7 Complete! [root@localhost ~]# ll /etc/yum.repos.d/mysql-community* -rw-r--r--. 1 root root 1147 Aug 27 2022 /etc/yum.repos.d/mysql-community-debuginfo.repo -rw-r--r--. 1 root root 2062 Aug 27 2022 /etc/yum.repos.d/mysql-community.repo -rw-r--r--. 1 root root 2132 Aug 27 2022 /etc/yum.repos.d/mysql-community-source.repo
耗时具体看网速, 有的可能要10分钟甚至更长。
和下载安装包差不多, 只是自动下载安装包了, 后面启动服务和修改密码和使用rpm包安装是一样的
[root@localhost ~]# yum -y remove mariadb-libs Loaded plugins: fastestmirror Resolving Dependencies --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be erased --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-9.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-9.el7.x86_64 --> Running transaction check ---> Package postfix.x86_64 2:2.10.1-9.el7 will be erased --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================================== Removing: mariadb-libs x86_64 1:5.5.68-1.el7 @anaconda 4.4 M Removing for dependencies: postfix x86_64 2:2.10.1-9.el7 @anaconda 12 M Transaction Summary =================================================================================================================================================== Remove 1 Package (+1 Dependent package) Installed size: 17 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : 2:postfix-2.10.1-9.el7.x86_64 1/2 Erasing : 1:mariadb-libs-5.5.68-1.el7.x86_64 2/2 Verifying : 1:mariadb-libs-5.5.68-1.el7.x86_64 1/2 Verifying : 2:postfix-2.10.1-9.el7.x86_64 2/2 Removed: mariadb-libs.x86_64 1:5.5.68-1.el7 Dependency Removed: postfix.x86_64 2:2.10.1-9.el7 Complete! [root@localhost ~]# yum -y install mysql-community-server Loaded plugins: fastestmirror Determining fastest mirrors centos_base | 3.6 kB 00:00:00 mysql-connectors-community | 2.6 kB 00:00:00 mysql-tools-community | 2.6 kB 00:00:00 mysql80-community | 2.6 kB 00:00:00 (1/3): mysql-connectors-community/x86_64/primary_db | 96 kB 00:00:01 (2/3): mysql-tools-community/x86_64/primary_db | 91 kB 00:00:02 (3/3): mysql80-community/x86_64/primary_db | 231 kB 00:00:03 Resolving Dependencies --> Running transaction check ---> Package mysql-community-server.x86_64 0:8.0.32-1.el7 will be installed --> Processing Dependency: mysql-community-common(x86-64) = 8.0.32-1.el7 for package: mysql-community-server-8.0.32-1.el7.x86_64 --> Processing Dependency: mysql-community-icu-data-files = 8.0.32-1.el7 for package: mysql-community-server-8.0.32-1.el7.x86_64 --> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.32-1.el7.x86_64 --> Processing Dependency: /usr/bin/perl for package: mysql-community-server-8.0.32-1.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-community-server-8.0.32-1.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-community-server-8.0.32-1.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-community-server-8.0.32-1.el7.x86_64 --> Running transaction check ---> Package mysql-community-client.x86_64 0:8.0.32-1.el7 will be installed --> Processing Dependency: mysql-community-client-plugins = 8.0.32-1.el7 for package: mysql-community-client-8.0.32-1.el7.x86_64 --> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.11 for package: mysql-community-client-8.0.32-1.el7.x86_64 ---> Package mysql-community-common.x86_64 0:8.0.32-1.el7 will be installed ---> Package mysql-community-icu-data-files.x86_64 0:8.0.32-1.el7 will be installed ---> Package net-tools.x86_64 0:2.0-0.25.20131004git.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(constant) 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: perl(File::Spec::Unix) for package: 4:perl-5.16.3-297.el7.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-297.el7.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-297.el7.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-297.el7.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-297.el7.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-297.el7.x86_64 --> Processing Dependency: perl(Carp) 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-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 --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-3.el7.noarch --> Running transaction check ---> Package mysql-community-client-plugins.x86_64 0:8.0.32-1.el7 will be installed ---> Package mysql-community-libs.x86_64 0:8.0.32-1.el7 will be installed ---> Package perl-Carp.noarch 0:1.26-244.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-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-PathTools.x86_64 0:3.40-5.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-Text-ParseWords.noarch 0:3.29-4.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-constant.noarch 0:1.27-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 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: mysql-community-server x86_64 8.0.32-1.el7 mysql80-community 64 M Installing for dependencies: mysql-community-client x86_64 8.0.32-1.el7 mysql80-community 16 M mysql-community-client-plugins x86_64 8.0.32-1.el7 mysql80-community 2.5 M mysql-community-common x86_64 8.0.32-1.el7 mysql80-community 654 k mysql-community-icu-data-files x86_64 8.0.32-1.el7 mysql80-community 2.1 M mysql-community-libs x86_64 8.0.32-1.el7 mysql80-community 1.5 M net-tools x86_64 2.0-0.25.20131004git.el7 centos_base 306 k perl x86_64 4:5.16.3-297.el7 centos_base 8.0 M perl-Carp noarch 1.26-244.el7 centos_base 19 k perl-Encode x86_64 2.51-7.el7 centos_base 1.5 M perl-Exporter noarch 5.68-3.el7 centos_base 28 k perl-File-Path noarch 2.09-2.el7 centos_base 26 k perl-File-Temp noarch 0.23.01-3.el7 centos_base 56 k perl-Filter x86_64 1.49-3.el7 centos_base 76 k perl-Getopt-Long noarch 2.40-3.el7 centos_base 56 k perl-HTTP-Tiny noarch 0.033-3.el7 centos_base 38 k perl-PathTools x86_64 3.40-5.el7 centos_base 82 k perl-Pod-Escapes noarch 1:1.04-297.el7 centos_base 52 k perl-Pod-Perldoc noarch 3.20-4.el7 centos_base 87 k perl-Pod-Simple noarch 1:3.28-4.el7 centos_base 216 k perl-Pod-Usage noarch 1.63-3.el7 centos_base 27 k perl-Scalar-List-Utils x86_64 1.27-248.el7 centos_base 36 k perl-Socket x86_64 2.010-5.el7 centos_base 49 k perl-Storable x86_64 2.45-3.el7 centos_base 77 k perl-Text-ParseWords noarch 3.29-4.el7 centos_base 14 k perl-Time-HiRes x86_64 4:1.9725-3.el7 centos_base 45 k perl-Time-Local noarch 1.2300-2.el7 centos_base 24 k perl-constant noarch 1.27-2.el7 centos_base 19 k perl-libs x86_64 4:5.16.3-297.el7 centos_base 689 k perl-macros x86_64 4:5.16.3-297.el7 centos_base 44 k perl-parent noarch 1:0.225-244.el7 centos_base 12 k perl-podlators noarch 2.5.1-3.el7 centos_base 112 k perl-threads x86_64 1.87-4.el7 centos_base 49 k perl-threads-shared x86_64 1.43-6.el7 centos_base 39 k Transaction Summary =================================================================================================================================================== Install 1 Package (+33 Dependent packages) Total download size: 99 M Installed size: 447 M Downloading packages: warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-client-plugins-8.0.32-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY Public key for mysql-community-client-plugins-8.0.32-1.el7.x86_64.rpm is not installed (1/6): mysql-community-client-plugins-8.0.32-1.el7.x86_64.rpm | 2.5 MB 00:00:43 (2/6): mysql-community-common-8.0.32-1.el7.x86_64.rpm | 654 kB 00:00:09 (3/6): mysql-community-client-8.0.32-1.el7.x86_64.rpm | 16 MB 00:01:02 (4/6): mysql-community-libs-8.0.32-1.el7.x86_64.rpm | 1.5 MB 00:00:10 (5/6): mysql-community-icu-data-files-8.0.32-1.el7.x86_64.rpm | 2.1 MB 00:00:30 (6/6): mysql-community-server-8.0.32-1.el7.x86_64.rpm | 64 MB 00:09:46 --------------------------------------------------------------------------------------------------------------------------------------------------- Total 153 kB/s | 99 MB 00:10:59 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022 Importing GPG key 0x3A79BD29: Userid : "MySQL Release Engineering <mysql-build@oss.oracle.com>" Fingerprint: 859b e8d7 c586 f538 430b 19c2 467b 942d 3a79 bd29 Package : mysql80-community-release-el7-7.noarch (@/mysql80-community-release-el7-7.noarch) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql Importing GPG key 0x5072E1F5: Userid : "MySQL Release Engineering <mysql-build@oss.oracle.com>" Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5 Package : mysql80-community-release-el7-7.noarch (@/mysql80-community-release-el7-7.noarch) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mysql-community-client-plugins-8.0.32-1.el7.x86_64 1/34 Installing : mysql-community-common-8.0.32-1.el7.x86_64 2/34 Installing : mysql-community-libs-8.0.32-1.el7.x86_64 3/34 Installing : mysql-community-client-8.0.32-1.el7.x86_64 4/34 Installing : 1:perl-parent-0.225-244.el7.noarch 5/34 Installing : perl-HTTP-Tiny-0.033-3.el7.noarch 6/34 Installing : perl-podlators-2.5.1-3.el7.noarch 7/34 Installing : perl-Pod-Perldoc-3.20-4.el7.noarch 8/34 Installing : 1:perl-Pod-Escapes-1.04-297.el7.noarch 9/34 Installing : perl-Encode-2.51-7.el7.x86_64 10/34 Installing : perl-Text-ParseWords-3.29-4.el7.noarch 11/34 Installing : perl-Pod-Usage-1.63-3.el7.noarch 12/34 Installing : 4:perl-libs-5.16.3-297.el7.x86_64 13/34 Installing : perl-Storable-2.45-3.el7.x86_64 14/34 Installing : perl-constant-1.27-2.el7.noarch 15/34 Installing : perl-Socket-2.010-5.el7.x86_64 16/34 Installing : perl-Time-Local-1.2300-2.el7.noarch 17/34 Installing : perl-Carp-1.26-244.el7.noarch 18/34 Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 19/34 Installing : perl-PathTools-3.40-5.el7.x86_64 20/34 Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64 21/34 Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch 22/34 Installing : perl-Exporter-5.68-3.el7.noarch 23/34 Installing : perl-threads-shared-1.43-6.el7.x86_64 24/34 Installing : perl-threads-1.87-4.el7.x86_64 25/34 Installing : perl-Filter-1.49-3.el7.x86_64 26/34 Installing : perl-File-Temp-0.23.01-3.el7.noarch 27/34 Installing : perl-File-Path-2.09-2.el7.noarch 28/34 Installing : 4:perl-macros-5.16.3-297.el7.x86_64 29/34 Installing : perl-Getopt-Long-2.40-3.el7.noarch 30/34 Installing : 4:perl-5.16.3-297.el7.x86_64 31/34 Installing : mysql-community-icu-data-files-8.0.32-1.el7.x86_64 32/34 Installing : net-tools-2.0-0.25.20131004git.el7.x86_64 33/34 Installing : mysql-community-server-8.0.32-1.el7.x86_64 34/34 Verifying : perl-HTTP-Tiny-0.033-3.el7.noarch 1/34 Verifying : perl-threads-shared-1.43-6.el7.x86_64 2/34 Verifying : perl-Storable-2.45-3.el7.x86_64 3/34 Verifying : 4:perl-libs-5.16.3-297.el7.x86_64 4/34 Verifying : mysql-community-client-8.0.32-1.el7.x86_64 5/34 Verifying : perl-constant-1.27-2.el7.noarch 6/34 Verifying : perl-PathTools-3.40-5.el7.x86_64 7/34 Verifying : perl-Socket-2.010-5.el7.x86_64 8/34 Verifying : mysql-community-server-8.0.32-1.el7.x86_64 9/34 Verifying : 1:perl-parent-0.225-244.el7.noarch 10/34 Verifying : 1:perl-Pod-Escapes-1.04-297.el7.noarch 11/34 Verifying : perl-File-Temp-0.23.01-3.el7.noarch 12/34 Verifying : net-tools-2.0-0.25.20131004git.el7.x86_64 13/34 Verifying : 1:perl-Pod-Simple-3.28-4.el7.noarch 14/34 Verifying : perl-Time-Local-1.2300-2.el7.noarch 15/34 Verifying : mysql-community-common-8.0.32-1.el7.x86_64 16/34 Verifying : perl-Carp-1.26-244.el7.noarch 17/34 Verifying : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 18/34 Verifying : perl-Scalar-List-Utils-1.27-248.el7.x86_64 19/34 Verifying : perl-Pod-Usage-1.63-3.el7.noarch 20/34 Verifying : perl-Encode-2.51-7.el7.x86_64 21/34 Verifying : perl-Exporter-5.68-3.el7.noarch 22/34 Verifying : mysql-community-libs-8.0.32-1.el7.x86_64 23/34 Verifying : perl-Pod-Perldoc-3.20-4.el7.noarch 24/34 Verifying : perl-podlators-2.5.1-3.el7.noarch 25/34 Verifying : mysql-community-icu-data-files-8.0.32-1.el7.x86_64 26/34 Verifying : perl-threads-1.87-4.el7.x86_64 27/34 Verifying : perl-Filter-1.49-3.el7.x86_64 28/34 Verifying : perl-Getopt-Long-2.40-3.el7.noarch 29/34 Verifying : perl-Text-ParseWords-3.29-4.el7.noarch 30/34 Verifying : perl-File-Path-2.09-2.el7.noarch 31/34 Verifying : mysql-community-client-plugins-8.0.32-1.el7.x86_64 32/34 Verifying : 4:perl-5.16.3-297.el7.x86_64 33/34 Verifying : 4:perl-macros-5.16.3-297.el7.x86_64 34/34 Installed: mysql-community-server.x86_64 0:8.0.32-1.el7 Dependency Installed: mysql-community-client.x86_64 0:8.0.32-1.el7 mysql-community-client-plugins.x86_64 0:8.0.32-1.el7 mysql-community-common.x86_64 0:8.0.32-1.el7 mysql-community-icu-data-files.x86_64 0:8.0.32-1.el7 mysql-community-libs.x86_64 0:8.0.32-1.el7 net-tools.x86_64 0:2.0-0.25.20131004git.el7 perl.x86_64 4:5.16.3-297.el7 perl-Carp.noarch 0:1.26-244.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@localhost ~]# systemctl --now enable mysqld [root@localhost ~]# grep 'temporary password' /var/log/mysqld.log #记录下临时产生的root密码 2023-04-11T09:34:03.954875Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: x)k(Wo4kPKeP [root@localhost ~]# mysql -u root -p`grep 'temporary password' /var/log/mysqld.log|tail -1 |awk '{print $NF}'` 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 8 Server version: 8.0.32 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> set password='********'; Query OK, 0 rows affected (0.01 sec)
点击 MySQL APT Repository 进入到下载页面
可以下载deb包,然后安装。
我们右键复制可以得到地址为
https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb
如下就把源安装上去了。装完了在apt配置目录/etc/apt/sources.list.d/下多了1个文件。后面的MySQL就是从这里下载安装包。
root@vm01:~# wget https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb --2023-04-11 09:31:38-- https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb Resolving dev.mysql.com (dev.mysql.com)... 104.71.161.87, 2600:140b:2:99d::2e31, 2600:140b:2:99c::2e31 Connecting to dev.mysql.com (dev.mysql.com)|104.71.161.87|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://repo.mysql.com//mysql-apt-config_0.8.24-1_all.deb [following] --2023-04-11 09:31:39-- https://repo.mysql.com//mysql-apt-config_0.8.24-1_all.deb Resolving repo.mysql.com (repo.mysql.com)... 23.203.124.221 Connecting to repo.mysql.com (repo.mysql.com)|23.203.124.221|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 18048 (18K) [application/x-debian-package] Saving to: ‘mysql-apt-config_0.8.24-1_all.deb’ mysql-apt-config_0.8.24-1_all.deb 100%[=====================================================================>] 17.62K --.-KB/s in 0.02s 2023-04-11 09:31:39 (719 KB/s) - ‘mysql-apt-config_0.8.24-1_all.deb’ saved [18048/18048] root@vm01:~# apt install ./mysql-apt-config_0.8.24-1_all.deb Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'mysql-apt-config' instead of './mysql-apt-config_0.8.24-1_all.deb' The following NEW packages will be installed: mysql-apt-config 0 upgraded, 1 newly installed, 0 to remove and 303 not upgraded. Need to get 0 B/18.0 kB of archives. After this operation, 35.8 kB of additional disk space will be used. Get:1 /root/mysql-apt-config_0.8.24-1_all.deb mysql-apt-config all 0.8.24-1 [18.0 kB] Preconfiguring packages ... Selecting previously unselected package mysql-apt-config. (Reading database ... 170919 files and directories currently installed.) Preparing to unpack .../mysql-apt-config_0.8.24-1_all.deb ... Unpacking mysql-apt-config (0.8.24-1) ... Setting up mysql-apt-config (0.8.24-1) ... Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config) Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). OK N: Download is performed unsandboxed as root as file '/root/mysql-apt-config_0.8.24-1_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
安装过程中提示选择安装的内容,选ok就行
需要先apt update 刷新源, 注意我们要安装的是mysql-community-server而不是 mysql-server-8.0, 所以要运行 apt -y install mysql-community-server
root@vm01:~# apt update Hit:1 http://mirrors.aliyun.com/ubuntu jammy InRelease Get:2 http://mirrors.aliyun.com/ubuntu jammy-updates InRelease [119 kB] Get:3 http://mirrors.aliyun.com/ubuntu jammy-backports InRelease [108 kB] Get:4 http://repo.mysql.com/apt/ubuntu jammy InRelease [15.2 kB] Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Get:6 http://mirrors.aliyun.com/ubuntu jammy-updates/main i386 Packages [467 kB] Get:7 http://mirrors.aliyun.com/ubuntu jammy-updates/main amd64 Packages [990 kB] Get:8 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 Sources [966 B] Get:9 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [728 kB] Get:10 http://repo.mysql.com/apt/ubuntu jammy/mysql-apt-config amd64 Packages [565 B] Get:11 http://repo.mysql.com/apt/ubuntu jammy/mysql-apt-config i386 Packages [565 B] Get:12 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 amd64 Packages [8,555 B] Get:13 http://repo.mysql.com/apt/ubuntu jammy/mysql-tools i386 Packages [455 B] Get:14 http://repo.mysql.com/apt/ubuntu jammy/mysql-tools amd64 Packages [7,905 B] Get:15 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [279 kB] Get:16 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [147 kB] Get:17 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [41.4 kB] Get:18 http://security.ubuntu.com/ubuntu jammy-security/main DEP-11 48x48 Icons [13.8 kB] Get:19 http://security.ubuntu.com/ubuntu jammy-security/main DEP-11 64x64 Icons [22.7 kB] Get:20 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [9,020 B] Get:21 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [701 kB] Get:22 http://mirrors.aliyun.com/ubuntu jammy-updates/main Translation-en [210 kB] Get:23 http://security.ubuntu.com/ubuntu jammy-security/restricted i386 Packages [26.8 kB] Get:24 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [109 kB] Get:25 http://mirrors.aliyun.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [102 kB] Get:26 http://mirrors.aliyun.com/ubuntu jammy-updates/main DEP-11 48x48 Icons [33.0 kB] Get:27 http://mirrors.aliyun.com/ubuntu jammy-updates/main DEP-11 64x64 Icons [51.3 kB] Get:28 http://mirrors.aliyun.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [13.9 kB] Get:29 http://mirrors.aliyun.com/ubuntu jammy-updates/restricted amd64 Packages [744 kB] Get:30 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [576 B] Get:31 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [716 kB] Get:32 http://mirrors.aliyun.com/ubuntu jammy-updates/restricted i386 Packages [27.1 kB] Get:33 http://mirrors.aliyun.com/ubuntu jammy-updates/restricted Translation-en [115 kB] Get:34 http://mirrors.aliyun.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [576 B] Get:35 http://mirrors.aliyun.com/ubuntu jammy-updates/universe amd64 Packages [899 kB] Get:36 http://mirrors.aliyun.com/ubuntu jammy-updates/universe i386 Packages [607 kB] Get:37 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [520 kB] Get:38 http://mirrors.aliyun.com/ubuntu jammy-updates/universe Translation-en [180 kB] Get:39 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [118 kB] Get:40 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [18.5 kB] Get:41 http://security.ubuntu.com/ubuntu jammy-security/universe DEP-11 48x48 Icons [15.4 kB] Get:42 http://security.ubuntu.com/ubuntu jammy-security/universe DEP-11 64x64 Icons [24.5 kB] Get:43 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [14.2 kB] Get:44 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [19.4 kB] Get:45 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages [1,028 B] Get:46 http://mirrors.aliyun.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [269 kB] Get:47 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en [4,068 B] Get:48 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [228 B] Get:49 http://mirrors.aliyun.com/ubuntu jammy-updates/universe DEP-11 48x48 Icons [173 kB] Get:50 http://mirrors.aliyun.com/ubuntu jammy-updates/universe DEP-11 64x64 Icons [267 kB] Get:51 http://mirrors.aliyun.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [18.6 kB] Get:52 http://mirrors.aliyun.com/ubuntu jammy-updates/multiverse amd64 Packages [24.1 kB] Get:53 http://mirrors.aliyun.com/ubuntu jammy-updates/multiverse i386 Packages [3,500 B] Get:54 http://mirrors.aliyun.com/ubuntu jammy-updates/multiverse Translation-en [6,312 B] Get:55 http://mirrors.aliyun.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B] Get:56 http://mirrors.aliyun.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [444 B] Get:57 http://mirrors.aliyun.com/ubuntu jammy-backports/main i386 Packages [33.7 kB] Get:58 http://mirrors.aliyun.com/ubuntu jammy-backports/main amd64 Packages [40.6 kB] Get:59 http://mirrors.aliyun.com/ubuntu jammy-backports/main Translation-en [9,800 B] Get:60 http://mirrors.aliyun.com/ubuntu jammy-backports/main amd64 DEP-11 Metadata [8,004 B] Get:61 http://mirrors.aliyun.com/ubuntu jammy-backports/main DEP-11 48x48 Icons [7,156 B] Get:62 http://mirrors.aliyun.com/ubuntu jammy-backports/main DEP-11 64x64 Icons [10.7 kB] Get:63 http://mirrors.aliyun.com/ubuntu jammy-backports/main DEP-11 64x64@2 Icons [29 B] Get:64 http://mirrors.aliyun.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [388 B] Get:65 http://mirrors.aliyun.com/ubuntu jammy-backports/universe i386 Packages [11.5 kB] Get:66 http://mirrors.aliyun.com/ubuntu jammy-backports/universe amd64 Packages [20.3 kB] Get:67 http://mirrors.aliyun.com/ubuntu jammy-backports/universe Translation-en [14.4 kB] Get:68 http://mirrors.aliyun.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [12.5 kB] Get:69 http://mirrors.aliyun.com/ubuntu jammy-backports/universe DEP-11 48x48 Icons [6,973 B] Get:70 http://mirrors.aliyun.com/ubuntu jammy-backports/universe DEP-11 64x64 Icons [13.4 kB] Get:71 http://mirrors.aliyun.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [480 B] Fetched 9,292 kB in 10s (937 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 469 packages can be upgraded. Run 'apt list --upgradable' to see them. W: http://repo.mysql.com/apt/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. root@vm01:~# apt -y install mysql-community-server Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-client-plugins mysql-community-server-core The following NEW packages will be installed: libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-client-plugins mysql-community-server mysql-community-server-core 0 upgraded, 11 newly installed, 0 to remove and 469 not upgraded. Need to get 38.2 MB of archives. After this operation, 273 MB of additional disk space will be used. Get:1 http://mirrors.aliyun.com/ubuntu jammy/main amd64 libmecab2 amd64 0.996-14build9 [199 kB] Get:2 http://mirrors.aliyun.com/ubuntu jammy/main amd64 mecab-utils amd64 0.996-14build9 [4,850 B] Get:3 http://mirrors.aliyun.com/ubuntu jammy/main amd64 mecab-ipadic all 2.7.0-20070801+main-3 [6,718 kB] Get:4 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 amd64 mysql-common amd64 8.0.32-1ubuntu22.04 [68.6 kB] Get:5 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 amd64 mysql-community-client-plugins amd64 8.0.32-1ubuntu22.04 [1,437 kB] Get:6 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 amd64 mysql-community-client-core amd64 8.0.32-1ubuntu22.04 [2,184 kB] Get:7 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 amd64 mysql-community-client amd64 8.0.32-1ubuntu22.04 [2,458 kB] Get:8 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 amd64 mysql-client amd64 8.0.32-1ubuntu22.04 [67.3 kB] Get:9 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.32-1ubuntu22.04 [25.0 MB] Get:10 http://mirrors.aliyun.com/ubuntu jammy/main amd64 mecab-ipadic-utf8 all 2.7.0-20070801+main-3 [4,384 B] Get:11 http://repo.mysql.com/apt/ubuntu jammy/mysql-8.0 amd64 mysql-community-server amd64 8.0.32-1ubuntu22.04 [79.1 kB] Fetched 38.2 MB in 31s (1,228 kB/s) Preconfiguring packages ... Selecting previously unselected package mysql-common. (Reading database ... 170924 files and directories currently installed.) Preparing to unpack .../00-mysql-common_8.0.32-1ubuntu22.04_amd64.deb ... Unpacking mysql-common (8.0.32-1ubuntu22.04) ... Selecting previously unselected package mysql-community-client-plugins. Preparing to unpack .../01-mysql-community-client-plugins_8.0.32-1ubuntu22.04_amd64.deb ... Unpacking mysql-community-client-plugins (8.0.32-1ubuntu22.04) ... Selecting previously unselected package mysql-community-client-core. Preparing to unpack .../02-mysql-community-client-core_8.0.32-1ubuntu22.04_amd64.deb ... Unpacking mysql-community-client-core (8.0.32-1ubuntu22.04) ... Selecting previously unselected package mysql-community-client. Preparing to unpack .../03-mysql-community-client_8.0.32-1ubuntu22.04_amd64.deb ... Unpacking mysql-community-client (8.0.32-1ubuntu22.04) ... Selecting previously unselected package mysql-client. Preparing to unpack .../04-mysql-client_8.0.32-1ubuntu22.04_amd64.deb ... Unpacking mysql-client (8.0.32-1ubuntu22.04) ... Selecting previously unselected package libmecab2:amd64. Preparing to unpack .../05-libmecab2_0.996-14build9_amd64.deb ... Unpacking libmecab2:amd64 (0.996-14build9) ... Selecting previously unselected package mysql-community-server-core. Preparing to unpack .../06-mysql-community-server-core_8.0.32-1ubuntu22.04_amd64.deb ... Unpacking mysql-community-server-core (8.0.32-1ubuntu22.04) ... Selecting previously unselected package mysql-community-server. Preparing to unpack .../07-mysql-community-server_8.0.32-1ubuntu22.04_amd64.deb ... Unpacking mysql-community-server (8.0.32-1ubuntu22.04) ... Selecting previously unselected package mecab-utils. Preparing to unpack .../08-mecab-utils_0.996-14build9_amd64.deb ... Unpacking mecab-utils (0.996-14build9) ... Selecting previously unselected package mecab-ipadic. Preparing to unpack .../09-mecab-ipadic_2.7.0-20070801+main-3_all.deb ... Unpacking mecab-ipadic (2.7.0-20070801+main-3) ... Selecting previously unselected package mecab-ipadic-utf8. Preparing to unpack .../10-mecab-ipadic-utf8_2.7.0-20070801+main-3_all.deb ... Unpacking mecab-ipadic-utf8 (2.7.0-20070801+main-3) ... Setting up libmecab2:amd64 (0.996-14build9) ... Setting up mysql-common (8.0.32-1ubuntu22.04) ... update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode Setting up mysql-community-server-core (8.0.32-1ubuntu22.04) ... Setting up mecab-utils (0.996-14build9) ... Setting up mysql-community-client-plugins (8.0.32-1ubuntu22.04) ... Setting up mecab-ipadic (2.7.0-20070801+main-3) ... Compiling IPA dictionary for Mecab. This takes long time... reading /usr/share/mecab/dic/ipadic/unk.def ... 40 emitting double-array: 100% |###########################################| /usr/share/mecab/dic/ipadic/model.def is not found. skipped. reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208 reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668 reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42 reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171 reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42 reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795 reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202 reading /usr/share/mecab/dic/ipadic/Others.csv ... 2 reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221 reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393 reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135 reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252 reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120 reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032 reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210 reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19 reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146 reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477 reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27328 reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750 reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146 reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151 reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999 reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199 reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328 reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91 emitting double-array: 100% |###########################################| reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316 emitting matrix : 100% |###########################################| done! update-alternatives: using /var/lib/mecab/dic/ipadic to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode Setting up mysql-community-client-core (8.0.32-1ubuntu22.04) ... Setting up mecab-ipadic-utf8 (2.7.0-20070801+main-3) ... Compiling IPA dictionary for Mecab. This takes long time... reading /usr/share/mecab/dic/ipadic/unk.def ... 40 emitting double-array: 100% |###########################################| /usr/share/mecab/dic/ipadic/model.def is not found. skipped. reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208 reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668 reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42 reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171 reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42 reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795 reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202 reading /usr/share/mecab/dic/ipadic/Others.csv ... 2 reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221 reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393 reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135 reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252 reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120 reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032 reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210 reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19 reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146 reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477 reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27328 reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750 reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146 reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151 reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999 reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199 reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328 reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91 emitting double-array: 100% |###########################################| reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316 emitting matrix : 100% |###########################################| done! update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode Setting up mysql-community-client (8.0.32-1ubuntu22.04) ... Setting up mysql-client (8.0.32-1ubuntu22.04) ... Setting up mysql-community-server (8.0.32-1ubuntu22.04) ... update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service. Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3) ... root@vm01:~# systemctl start mysql
安装过程中会提示输入管理员root密码和密码加密方式。
至此, 在Centos7和Ubuntu22.04上使用官方源自动下载安装MySQL就结束了, 比较简单方便。
和先下载安装包再本地安装差别就是要先装一个源的包,然后直接安装MySQL就行了。比较适合测试环境,测试环境可以联网。
大部分生产环境还是网络隔绝的,只能是先下载上传安装包再本地安装了。
谢谢,觉得不错请关注防丢失。
9de7bb31d0644e7393039222babfed10
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。