龙芯源码编译MySQL

在龙芯+麒麟操作系统环境使用源码编译MySQL5.7.39,其操作步骤如下:
查看是否已安装mariadb,若是已安装,需要卸载

[root@localhost yum.repos.d]# rpm -qa|grep mariadb
mariadb-10.3.9-8.p01.ky10.mips64el
mariadb-common-10.3.9-8.p01.ky10.mips64el
mariadb-errmessage-10.3.9-8.p01.ky10.mips64el
mariadb-connector-c-3.0.6-6.ky10.mips64el
mariadb-server-10.3.9-8.p01.ky10.mips64el

要是有,卸载:# yum remove mariadb

[root@localhost yum.repos.d]# yum remove mariadb
Warning: failed loading '/etc/yum.repos.d/kylin.repo', skipping.
Dependencies resolved.
=================================================================================================================================================================================================
 Package                                         Architecture                              Version                                              Repository                                  Size
=================================================================================================================================================================================================
Removing:
 mariadb                                         mips64el                                  3:10.3.9-8.p01.ky10                                  @anaconda                                   38 M
Removing dependent packages:
 mariadb-server                                  mips64el                                  3:10.3.9-8.p01.ky10                                  @anaconda                                   92 M
Removing unused dependencies:
 perl-DBD-MySQL                                  mips64el                                  4.046-6.ky10                                         @anaconda                                  327 k

Transaction Summary
=================================================================================================================================================================================================
Remove  3 Packages

Freed space: 129 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                         1/1
  Running scriptlet: mariadb-3:10.3.9-8.p01.ky10.mips64el                                                                                                                                    1/1
  Erasing          : mariadb-3:10.3.9-8.p01.ky10.mips64el                                                                                                                                    1/3
  Running scriptlet: mariadb-server-3:10.3.9-8.p01.ky10.mips64el                                                                                                                             2/3
  Erasing          : mariadb-server-3:10.3.9-8.p01.ky10.mips64el                                                                                                                             2/3
  Running scriptlet: mariadb-server-3:10.3.9-8.p01.ky10.mips64el                                                                                                                             2/3
  Erasing          : perl-DBD-MySQL-4.046-6.ky10.mips64el                                                                                                                                    3/3
  Running scriptlet: perl-DBD-MySQL-4.046-6.ky10.mips64el                                                                                                                                    3/3
  Verifying        : mariadb-3:10.3.9-8.p01.ky10.mips64el                                                                                                                                    1/3
  Verifying        : mariadb-server-3:10.3.9-8.p01.ky10.mips64el                                                                                                                             2/3
  Verifying        : perl-DBD-MySQL-4.046-6.ky10.mips64el                                                                                                                                    3/3

Removed:
  mariadb-3:10.3.9-8.p01.ky10.mips64el                         mariadb-server-3:10.3.9-8.p01.ky10.mips64el                         perl-DBD-MySQL-4.046-6.ky10.mips64el

Complete!

[root@localhost soft]# mkdir /mnt/cdrom
[root@localhost soft]# mount -o loop -t iso9660 Kylin-Server-10-SP1-Release-Build18-20210809-mips64el.iso /mnt/cdrom
mount: /mnt/cdrom: WARNING: source write-protected, mounted read-only.
[root@localhost soft]# cd /mnt/cdrom
[root@localhost cdrom]# ls
boot  boot.catalog  EFI  images  LICENSE  manual  Packages  repodata  TRANS.TBL

[root@localhost yum.repos.d]# cat kylin.repo
[ks10-local-iso]
name = Kylin Linux Advanced Server 10 - local
baseurl = file:///mnt/cdrom/
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kylin
enabled = 1

(2)下载源码包并解压

# wget https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.29.tar.gz
# tar -zxvf mysql-5.7.29.tar.gz

(3)yum安装编译所需要的工具和库

# yum install gcc gcc-c++ cmake ncurses-devel bison openssl-devel rpcgen

上面的软件要一个一个安装,一起可能有问题

[root@localhost yum.repos.d]# yum -y install gcc* gcc-c++ ncurses* ncurses-devel* cmake* bison* libgcrypt* perl* make* openssl-devel* rpcgen*
Last metadata expiration check: 0:01:56 ago on 2022年11月15日 星期二 23时22分05秒.
Package gcc-8.3.1-4.5.p03.ky10.mips64el is already installed.
Package ncurses-6.1-14.ky10.mips64el is already installed.
Package ncurses-base-6.1-14.ky10.noarch is already installed.
Package ncurses-libs-6.1-14.ky10.mips64el is already installed.
Package cmake-3.12.1-5.ky10.mips64el is already installed.
Package cmake-data-3.12.1-5.ky10.noarch is already installed.
Package cmake-filesystem-3.12.1-5.ky10.mips64el is already installed.
Package cmake-help-3.12.1-5.ky10.noarch is already installed.
Package cmake-rpm-macros-3.12.1-5.ky10.noarch is already installed.
Package libgcrypt-1.8.3-5.ky10.mips64el is already installed.
Package perl-4:5.28.0-434.ky10.mips64el is already installed.
Package perl-Algorithm-Diff-1.1903-14.ky10.noarch is already installed.
Package perl-Algorithm-Diff-help-1.1903-14.ky10.noarch is already installed.
Package perl-Archive-Tar-2.30-421.ky10.noarch is already installed.
Package perl-Authen-SASL-help-2.16-16.ky10.noarch is already installed.
Package perl-B-Debug-1.26-4.ky10.noarch is already installed.
Package perl-B-Debug-help-1.26-4.ky10.noarch is already installed.
Package perl-Business-ISBN-Data-help-20191107-2.ky10.noarch is already installed.
Package perl-Business-ISBN-help-3.005-1.ky10.noarch is already installed.
Package perl-CGI-help-4.46-1.ky10.noarch is already installed.
Package perl-CPAN-Meta-2.150010-419.ky10.noarch is already installed.
Package perl-CPAN-Meta-Requirements-2.140-419.ky10.noarch is already installed.
Package perl-CPAN-Meta-Requirements-help-2.140-419.ky10.noarch is already installed.
Package perl-CPAN-Meta-YAML-0.018-420.ky10.noarch is already installed.
Package perl-CPAN-Meta-YAML-help-0.018-420.ky10.noarch is already installed.
Package perl-CPAN-Meta-help-2.150010-419.ky10.noarch is already installed.
Package perl-Capture-Tiny-help-0.48-4.ky10.noarch is already installed.
Package perl-Carp-1.50-418.ky10.noarch is already installed.
Package perl-Carp-help-1.50-418.ky10.noarch is already installed.
Package perl-Class-Inspector-help-1.32-5.ky10.noarch is already installed.
Package perl-Class-Method-Modifiers-help-2.12-12.ky10.noarch is already installed.
Package perl-Class-XSAccessor-help-1.19-18.ky10.noarch is already installed.
Package perl-Compress-Bzip2-help-2.26-10.ky10.noarch is already installed.
Package perl-Compress-Raw-Bzip2-2.081-8.ky10.mips64el is already installed.
Package perl-Compress-Raw-Bzip2-help-2.081-8.ky10.noarch is already installed.
Package perl-Compress-Raw-Zlib-2.081-6.ky10.mips64el is already installed.
Package perl-Compress-Raw-Zlib-help-2.081-6.ky10.noarch is already installed.
Package perl-Config-General-help-2.63-1.ky10.noarch is already installed.
Package perl-Config-Perl-V-0.30-5.ky10.noarch is already installed.
Package perl-Config-Perl-V-help-0.30-5.ky10.noarch is already installed.
Package perl-Crypt-OpenSSL-Random-help-0.15-4.ky10.noarch is already installed.
Package perl-Crypt-PasswdMD5-help-1.4.0-14.ky10.noarch is already installed.
Package perl-DBD-MySQL-help-4.046-6.ky10.mips64el is already installed.
Package perl-DBD-SQLite-1.58-4.ky10.mips64el is already installed.
Package perl-DBD-SQLite-help-1.58-4.ky10.mips64el is already installed.
Package perl-DBI-1.642-2.ky10.mips64el is already installed.
Package perl-DBI-help-1.642-2.ky10.noarch is already installed.
Package perl-DB_File-1.842-2.ky10.mips64el is already installed.
Package perl-DB_File-help-1.842-2.ky10.noarch is already installed.
Package perl-Data-Dumper-2.172-3.ky10.mips64el is already installed.
Package perl-Data-Dumper-help-2.172-3.ky10.noarch is already installed.
Package perl-Data-Section-help-0.200007-6.ky10.noarch is already installed.
Package perl-Date-Calc-help-6.4-12.ky10.noarch is already installed.
Package perl-Devel-CheckLib-help-1.13-5.ky10.noarch is already installed.
Package perl-Devel-GlobalDestruction-help-0.14-8.ky10.noarch is already installed.
Package perl-Devel-PPPort-3.42-4.ky10.mips64el is already installed.
Package perl-Devel-PPPort-help-3.42-4.ky10.noarch is already installed.
Package perl-Devel-Size-help-0.82-4.ky10.noarch is already installed.
Package perl-Digest-1.17-419.ky10.noarch is already installed.
Package perl-Digest-MD5-2.55-419.ky10.mips64el is already installed.
Package perl-Digest-MD5-help-2.55-419.ky10.noarch is already installed.
Package perl-Digest-SHA-1:6.02-7.ky10.mips64el is already installed.
Package perl-Digest-SHA-help-1:6.02-7.ky10.noarch is already installed.
Package perl-Digest-SHA3-help-1.04-4.ky10.mips64el is already installed.
Package perl-Digest-help-1.17-419.ky10.noarch is already installed.
Package perl-Encode-4:2.98-9.ky10.mips64el is already installed.
Package perl-Encode-Locale-help-1.05-12.ky10.noarch is already installed.
Package perl-Encode-devel-4:2.98-9.ky10.mips64el is already installed.
Package perl-Encode-help-4:2.98-9.ky10.noarch is already installed.
Package perl-Env-1.04-397.ky10.noarch is already installed.
Package perl-Env-help-1.04-397.ky10.noarch is already installed.
Package perl-Error-1:0.17026-4.ky10.noarch is already installed.
Package perl-Error-help-1:0.17026-4.ky10.noarch is already installed.
Package perl-Exporter-5.73-420.ky10.noarch is already installed.
Package perl-Exporter-Tiny-help-1.002001-5.ky10.noarch is already installed.
Package perl-Exporter-help-5.73-420.ky10.noarch is already installed.
Package perl-ExtUtils-Command-1:7.42-2.ky10.noarch is already installed.
Package perl-ExtUtils-Config-help-0.008-19.ky10.noarch is already installed.
Package perl-ExtUtils-Helpers-0.026-13.ky10.noarch is already installed.
Package perl-ExtUtils-Install-2.14-419.ky10.noarch is already installed.
Package perl-ExtUtils-Install-help-2.14-419.ky10.noarch is already installed.
Package perl-ExtUtils-InstallPaths-help-0.012-9.ky10.noarch is already installed.
Package perl-ExtUtils-MakeMaker-1:7.42-2.ky10.noarch is already installed.
Package perl-ExtUtils-MakeMaker-help-1:7.42-2.ky10.noarch is already installed.
Package perl-ExtUtils-Manifest-1:1.71-4.ky10.noarch is already installed.
Package perl-ExtUtils-Manifest-help-1:1.71-4.ky10.noarch is already installed.
Package perl-ExtUtils-ParseXS-2:3.35-1.ky10.noarch is already installed.
Package perl-ExtUtils-ParseXS-help-2:3.35-1.ky10.noarch is already installed.
Package perl-Fedora-VSP-help-0.001-10.ky10.noarch is already installed.
Package perl-File-BaseDir-help-0.08-6.ky10.noarch is already installed.
Package perl-File-DesktopEntry-help-0.22-11.ky10.noarch is already installed.
Package perl-File-Fetch-0.56-4.ky10.noarch is already installed.
Package perl-File-Fetch-help-0.56-4.ky10.noarch is already installed.
Package perl-File-HomeDir-1.004-4.ky10.noarch is already installed.
Package perl-File-HomeDir-help-1.004-4.ky10.noarch is already installed.
Package perl-File-Path-2.16-4.ky10.noarch is already installed.
Package perl-File-Path-help-2.16-4.ky10.noarch is already installed.
Package perl-File-ReadBackwards-help-1.05-1.ky10.noarch is already installed.
Package perl-File-Remove-help-1.58-2.ky10.noarch is already installed.
Package perl-File-ShareDir-Install-help-0.13-4.ky10.noarch is already installed.
Package perl-File-ShareDir-help-1.116-4.ky10.noarch is already installed.
Package perl-File-Slurp-help-9999.19-22.ky10.noarch is already installed.
Package perl-File-Sync-help-0.11-20.ky10.noarch is already installed.
Package perl-File-Temp-1:0.230.800-4.ky10.noarch is already installed.
Package perl-File-Temp-help-1:0.230.800-4.ky10.noarch is already installed.
Package perl-File-Which-1.22-6.ky10.noarch is already installed.
Package perl-File-Which-help-1.22-6.ky10.noarch is already installed.
Package perl-Filter-2:1.59-2.ky10.mips64el is already installed.
Package perl-Filter-Simple-1:0.94-1.ky10.noarch is already installed.
Package perl-Filter-Simple-help-1:0.94-1.ky10.noarch is already installed.
Package perl-Font-TTF-help-1.06-9.ky10.noarch is already installed.
Package perl-GD-Barcode-help-1.15-30.ky10.noarch is already installed.
Package perl-GD-help-2.71-1.p01.ky10.noarch is already installed.
Package perl-GSSAPI-help-0.28-26.ky10.mips64el is already installed.
Package perl-Getopt-Long-2.50-419.ky10.noarch is already installed.
Package perl-Getopt-Long-help-2.50-419.ky10.noarch is already installed.
Package perl-Git-2.27.0-4.ky10.noarch is already installed.
Package perl-HTML-Parser-help-3.72-16.ky10.mips64el is already installed.
Package perl-HTML-Tagset-help-3.20-37.ky10.noarch is already installed.
Package perl-HTTP-Cookies-help-6.04-5.ky10.noarch is already installed.
Package perl-HTTP-Daemon-help-6.01-26.ky10.noarch is already installed.
Package perl-HTTP-Date-help-6.02-21.ky10.noarch is already installed.
Package perl-HTTP-Message-help-6.18-4.ky10.noarch is already installed.
Package perl-HTTP-Negotiate-help-6.01-22.ky10.noarch is already installed.
Package perl-HTTP-Tiny-0.076-3.ky10.noarch is already installed.
Package perl-HTTP-Tiny-help-0.076-3.ky10.noarch is already installed.
Package perl-IO-Compress-2.081-6.ky10.noarch is already installed.
Package perl-IO-Compress-help-2.081-6.ky10.noarch is already installed.
Package perl-IO-HTML-help-1.001-13.ky10.noarch is already installed.
Package perl-IO-Socket-INET6-help-2.72-15.ky10.noarch is already installed.
Package perl-IO-Socket-IP-0.39-420.ky10.noarch is already installed.
Package perl-IO-Socket-IP-help-0.39-420.ky10.noarch is already installed.
Package perl-IO-Socket-SSL-help-2.066-4.ky10.noarch is already installed.
Package perl-IO-stringy-help-2.111-12.ky10.noarch is already installed.
Package perl-IPC-Cmd-2:1.04-4.ky10.noarch is already installed.
Package perl-IPC-Cmd-help-2:1.04-4.ky10.noarch is already installed.
Package perl-IPC-SysV-2.07-5.ky10.mips64el is already installed.
Package perl-IPC-SysV-help-2.07-5.ky10.noarch is already installed.
Package perl-IPC-System-Simple-1.25-19.ky10.noarch is already installed.
Package perl-IPC-System-Simple-help-1.25-19.ky10.noarch is already installed.
Package perl-JSON-PP-1:4.04-2.ky10.noarch is already installed.
Package perl-JSON-PP-help-1:4.04-2.ky10.noarch is already installed.
Package perl-JSON-XS-help-1:3.04-6.ky10.noarch is already installed.
Package perl-JSON-help-2.97.001-6.ky10.noarch is already installed.
Package perl-LWP-MediaTypes-help-6.02-17.ky10.noarch is already installed.
Package perl-List-MoreUtils-XS-help-0.428-7.ky10.noarch is already installed.
Package perl-List-MoreUtils-help-0.428-5.ky10.noarch is already installed.
Package perl-Locale-Codes-3.58-2.ky10.noarch is already installed.
Package perl-Locale-Codes-help-3.58-2.ky10.noarch is already installed.
Package perl-Locale-Maketext-1:1.28-1.ky10.noarch is already installed.
Package perl-Locale-Maketext-help-1:1.28-1.ky10.noarch is already installed.
Package perl-MIME-Base64-3.15-418.ky10.mips64el is already installed.
Package perl-MIME-Base64-help-3.15-418.ky10.noarch is already installed.
Package perl-MRO-Compat-help-0.13-9.ky10.noarch is already installed.
Package perl-Math-BigInt-1:1.9998.13-5.ky10.noarch is already installed.
Package perl-Math-BigInt-FastCalc-0.500.700-4.ky10.mips64el is already installed.
Package perl-Math-BigInt-FastCalc-help-0.500.700-4.ky10.noarch is already installed.
Package perl-Math-BigInt-help-1:1.9998.13-5.ky10.noarch is already installed.
Package perl-Math-BigRat-0.2614-2.ky10.noarch is already installed.
Package perl-Math-BigRat-help-0.2614-2.ky10.noarch is already installed.
Package perl-Module-Build-Tiny-help-0.039-17.ky10.noarch is already installed.
Package perl-Module-Build-help-2:0.42.24-12.ky10.noarch is already installed.
Package perl-Module-CoreList-1:5.20180920-2.ky10.noarch is already installed.
Package perl-Module-CoreList-help-1:5.20180920-2.ky10.noarch is already installed.
Package perl-Module-Install-AuthorRequires-help-0.02-18.ky10.noarch is already installed.
Package perl-Module-Install-AuthorTests-help-0.002-18.ky10.noarch is already installed.
Package perl-Module-Install-ReadmeFromPod-help-0.30-12.ky10.noarch is already installed.
Package perl-Module-Install-ReadmeMarkdownFromPod-help-0.04-10.ky10.noarch is already installed.
Package perl-Module-Install-Repository-help-0.06-23.ky10.noarch is already installed.
Package perl-Module-Load-1:0.32-418.ky10.noarch is already installed.
Package perl-Module-Load-Conditional-0.68-418.ky10.noarch is already installed.
Package perl-Module-Load-Conditional-help-0.68-418.ky10.noarch is already installed.
Package perl-Module-Load-help-1:0.32-418.ky10.noarch is already installed.
Package perl-Module-Manifest-Skip-help-0.23-16.ky10.noarch is already installed.
Package perl-Module-Metadata-1.000036-3.ky10.noarch is already installed.
Package perl-Module-Metadata-help-1.000036-3.ky10.noarch is already installed.
Package perl-Module-Package-Au-help-2-16.ky10.noarch is already installed.
Package perl-Module-Package-help-0.30-22.ky10.noarch is already installed.
Package perl-Module-Runtime-help-0.016-5.ky10.noarch is already installed.
Package perl-Module-ScanDeps-help-1.27-6.p01.ky10.noarch is already installed.
Package perl-Moo-help-2.003004-8.ky10.noarch is already installed.
Package perl-Mozilla-CA-help-1:20180117-6.ky10.noarch is already installed.
Package perl-NTLM-help-1.09-20.ky10.noarch is already installed.
Package perl-Net-Daemon-1:0.48-2.ky10.noarch is already installed.
Package perl-Net-Daemon-help-1:0.48-2.ky10.noarch is already installed.
Package perl-Net-HTTP-help-6.18-4.ky10.noarch is already installed.
Package perl-Net-LibIDN-help-0.12-33.ky10.noarch is already installed.
Package perl-Net-SNMP-help-6.0.1-23.ky10.noarch is already installed.
Package perl-Net-SSLeay-help-1.88-5.ky10.noarch is already installed.
Package perl-NetAddr-IP-help-4.079-10.ky10.mips64el is already installed.
Package perl-Package-Constants-help-1:0.06-1.ky10.noarch is already installed.
Package perl-Package-Generator-help-1.106-14.ky10.noarch is already installed.
Package perl-Params-Check-1:0.38-418.ky10.noarch is already installed.
Package perl-Params-Check-help-1:0.38-418.ky10.noarch is already installed.
Package perl-Params-Util-help-1.07-26.ky10.noarch is already installed.
Package perl-Parse-Yapp-help-1.21-5.ky10.noarch is already installed.
Package perl-Path-Class-help-0.37-14.ky10.noarch is already installed.
Package perl-Path-Tiny-help-0.108-2.ky10.noarch is already installed.
Package perl-PathTools-3.75-4.ky10.mips64el is already installed.
Package perl-PathTools-help-3.75-4.ky10.noarch is already installed.
Package perl-Perl-OSType-1.010-421.ky10.noarch is already installed.
Package perl-Perl-OSType-help-1.010-421.ky10.noarch is already installed.
Package perl-PerlIO-via-QuotedPrint-0.08-397.ky10.noarch is already installed.
Package perl-PerlIO-via-QuotedPrint-help-0.08-397.ky10.noarch is already installed.
Package perl-Pod-Checker-4:1.73-398.ky10.noarch is already installed.
Package perl-Pod-Checker-help-4:1.73-398.ky10.noarch is already installed.
Package perl-Pod-Escapes-1:1.07-419.ky10.noarch is already installed.
Package perl-Pod-Escapes-help-1:1.07-419.ky10.noarch is already installed.
Package perl-Pod-Markdown-help-3.101-2.ky10.noarch is already installed.
Package perl-Pod-Parser-1.63-397.ky10.noarch is already installed.
Package perl-Pod-Parser-help-1.63-397.ky10.noarch is already installed.
Package perl-Pod-Perldoc-1:3.28-3.ky10.noarch is already installed.
Package perl-Pod-Perldoc-help-1:3.28-3.ky10.noarch is already installed.
Package perl-Pod-Simple-1:3.35-418.ky10.noarch is already installed.
Package perl-Pod-Simple-help-1:3.35-418.ky10.noarch is already installed.
Package perl-Pod-Usage-4:1.69-418.ky10.noarch is already installed.
Package perl-Pod-Usage-help-4:1.69-418.ky10.noarch is already installed.
Package perl-Readonly-help-2.05-8.ky10.noarch is already installed.
Package perl-Role-Tiny-help-2.001004-2.ky10.noarch is already installed.
Package perl-SGMLSpm-1.03ii-45.ky10.noarch is already installed.
Package perl-SGMLSpm-help-1.03ii-45.ky10.noarch is already installed.
Package perl-SNMP_Session-help-1.13-20.ky10.noarch is already installed.
Package perl-Scalar-List-Utils-3:1.52-2.ky10.mips64el is already installed.
Package perl-Scalar-List-Utils-help-3:1.52-2.ky10.noarch is already installed.
Package perl-Socket-4:2.029-2.ky10.mips64el is already installed.
Package perl-Socket-MsgHdr-help-0.05-5.ky10.noarch is already installed.
Package perl-Socket-help-4:2.029-2.ky10.noarch is already installed.
Package perl-Socket6-help-0.28-9.ky10.mips64el is already installed.
Package perl-Software-License-help-0.103013-7.ky10.noarch is already installed.
Package perl-Storable-1:3.15-2.ky10.mips64el is already installed.
Package perl-Storable-help-1:3.15-2.ky10.noarch is already installed.
Package perl-String-ShellQuote-help-1.04-26.ky10.noarch is already installed.
Package perl-Sub-Exporter-Progressive-help-0.001013-8.ky10.noarch is already installed.
Package perl-Sub-Exporter-help-0.987-18.ky10.noarch is already installed.
Package perl-Sub-Install-help-0.928-18.ky10.noarch is already installed.
Package perl-Sub-Name-help-0.21-10.ky10.mips64el is already installed.
Package perl-Sub-Quote-help-2.005001-4.ky10.noarch is already installed.
Package perl-Sys-CPU-help-0.61-19.ky10.noarch is already installed.
Package perl-Sys-MemInfo-help-0.99-9.ky10.noarch is already installed.
Package perl-Sys-Syslog-0.35-420.ky10.mips64el is already installed.
Package perl-Sys-Syslog-help-0.35-420.ky10.noarch is already installed.
Package perl-Term-ANSIColor-4.06-511.ky10.noarch is already installed.
Package perl-Term-ANSIColor-help-4.06-511.ky10.noarch is already installed.
Package perl-Term-Cap-1.17-510.ky10.noarch is already installed.
Package perl-Term-Cap-help-1.17-510.ky10.noarch is already installed.
Package perl-TermReadKey-2.38-2.ky10.mips64el is already installed.
Package perl-TermReadKey-help-2.38-2.ky10.noarch is already installed.
Package perl-Test-Deep-help-1.128-4.ky10.noarch is already installed.
Package perl-Test-FailWarnings-help-0.008-15.ky10.noarch is already installed.
Package perl-Test-Fatal-help-0.014-13.ky10.noarch is already installed.
Package perl-Test-Harness-1:3.43_01-3.ky10.noarch is already installed.
Package perl-Test-Harness-help-1:3.43_01-3.ky10.noarch is already installed.
Package perl-Test-InDistDir-help-1.112071-10.ky10.noarch is already installed.
Package perl-Test-LeakTrace-help-0.16-10.ky10.noarch is already installed.
Package perl-Test-NoWarnings-help-1.04-17.ky10.noarch is already installed.
Package perl-Test-Pod-Coverage-help-1.10-14.ky10.noarch is already installed.
Package perl-Test-Pod-help-1.52-4.ky10.noarch is already installed.
Package perl-Test-Requires-help-0.10-15.ky10.noarch is already installed.
Package perl-Test-Simple-2:1.302140-3.ky10.noarch is already installed.
Package perl-Test-Simple-help-2:1.302140-3.ky10.noarch is already installed.
Package perl-Text-Balanced-2.03-420.ky10.noarch is already installed.
Package perl-Text-Balanced-help-2.03-420.ky10.noarch is already installed.
Package perl-Text-Diff-1.45-7.ky10.noarch is already installed.
Package perl-Text-Diff-help-1.45-7.ky10.noarch is already installed.
Package perl-Text-Glob-help-0.11-7.ky10.noarch is already installed.
Package perl-Text-ParseWords-3.30-419.ky10.noarch is already installed.
Package perl-Text-ParseWords-help-3.30-419.ky10.noarch is already installed.
Package perl-Text-Tabs+Wrap-2013.0523-419.ky10.noarch is already installed.
Package perl-Text-Tabs+Wrap-help-2013.0523-419.ky10.noarch is already installed.
Package perl-Text-Template-help-1.53-4.ky10.noarch is already installed.
Package perl-Text-WrapI18N-help-0.06-33.ky10.noarch is already installed.
Package perl-Thread-Queue-3.13-3.ky10.noarch is already installed.
Package perl-Thread-Queue-help-3.13-3.ky10.noarch is already installed.
Package perl-Time-HiRes-1.9760-2.ky10.mips64el is already installed.
Package perl-Time-HiRes-help-1.9760-2.ky10.noarch is already installed.
Package perl-Time-Local-2:1.280-6.ky10.noarch is already installed.
Package perl-Time-Local-help-2:1.280-6.ky10.noarch is already installed.
Package perl-TimeDate-help-1:2.30-17.ky10.noarch is already installed.
Package perl-Types-Serialiser-help-1.0-18.ky10.noarch is already installed.
Package perl-URI-help-1.76-3.ky10.noarch is already installed.
Package perl-Unicode-Collate-1.25-4.ky10.mips64el is already installed.
Package perl-Unicode-Collate-help-1.25-4.ky10.noarch is already installed.
Package perl-Unicode-Normalize-1.26-419.ky10.mips64el is already installed.
Package perl-Unicode-Normalize-help-1.26-419.ky10.noarch is already installed.
Package perl-Unicode-UTF8-help-0.62-8.ky10.noarch is already installed.
Package perl-XML-LibXML-help-1:2.0132-5.ky10.mips64el is already installed.
Package perl-XML-NamespaceSupport-help-1.12-7.ky10.noarch is already installed.
Package perl-XML-Parser-1:2.44-3.ky10.mips64el is already installed.
Package perl-XML-Parser-help-1:2.44-3.ky10.noarch is already installed.
Package perl-XML-SAX-Base-help-1.09-7.ky10.noarch is already installed.
Package perl-XML-SAX-help-1.00-5.ky10.noarch is already installed.
Package perl-XML-Writer-help-0.625-14.ky10.noarch is already installed.
Package perl-XML-XPath-help-1.42-6.ky10.noarch is already installed.
Package perl-YAML-Tiny-help-1.73-4.ky10.noarch is already installed.
Package perl-YAML-help-1.26-5.ky10.noarch is already installed.
Package perl-autodie-2.29-398.ky10.noarch is already installed.
Package perl-autodie-help-2.29-398.ky10.noarch is already installed.
Package perl-bignum-0.50-4.ky10.noarch is already installed.
Package perl-bignum-help-0.50-4.ky10.noarch is already installed.
Package perl-common-sense-help-3.7.4-14.ky10.noarch is already installed.
Package perl-constant-1.33-421.ky10.noarch is already installed.
Package perl-constant-help-1.33-421.ky10.noarch is already installed.
Package perl-devel-4:5.28.0-434.ky10.mips64el is already installed.
Package perl-experimental-0.020-2.ky10.noarch is already installed.
Package perl-experimental-help-0.020-2.ky10.noarch is already installed.
Package perl-gettext-help-1.07-13.ky10.noarch is already installed.
Package perl-inc-latest-help-2:0.500-12.ky10.noarch is already installed.
Package perl-libintl-perl-help-1.29-6.ky10.noarch is already installed.
Package perl-libnet-3.11-420.ky10.noarch is already installed.
Package perl-libnet-help-3.11-420.ky10.noarch is already installed.
Package perl-libs-4:5.28.0-434.ky10.mips64el is already installed.
Package perl-libwww-perl-help-6.35-2.ky10.noarch is already installed.
Package perl-libxml-perl-help-0.08-36.ky10.noarch is already installed.
Package perl-parent-1:0.237-4.ky10.noarch is already installed.
Package perl-parent-help-1:0.237-4.ky10.noarch is already installed.
Package perl-perlfaq-5.20180915-5.ky10.noarch is already installed.
Package perl-perlfaq-help-5.20180915-5.ky10.noarch is already installed.
Package perl-podlators-1:4.11-5.ky10.noarch is already installed.
Package perl-podlators-help-1:4.11-5.ky10.noarch is already installed.
Package perl-strictures-help-2.000006-7.ky10.noarch is already installed.
Package perl-threads-1:2.22-419.ky10.mips64el is already installed.
Package perl-threads-help-1:2.22-419.ky10.noarch is already installed.
Package perl-threads-shared-1.59-2.ky10.mips64el is already installed.
Package perl-threads-shared-help-1.59-2.ky10.noarch is already installed.
Package perl-version-8:0.99.24-3.ky10.mips64el is already installed.
Package perl-version-help-8:0.99.24-3.ky10.noarch is already installed.
Package make-1:4.2.1-15.ky10.mips64el is already installed.

创建mysql用户与用户组

[root@localhost /]# groupadd mysql
groupadd:“mysql”组已存在
[root@localhost /]# id mysql
用户id=27(mysql) 组id=27(mysql) 组=27(mysql)

创建并修改/mysqlsoft/mysql与/mysqldata/mysql目录权限

[root@localhost /]# mkdir -p /mysqlsoft/mysql
[root@localhost /]# mkdir -p /mysqldata/mysql
[root@localhost /]# chown -R mysql:mysql /mysqlsoft
[root@localhost /]# chown -R mysql:mysql /mysqldata
[root@localhost /]# chmod -R 775 /mysqlsoft
[root@localhost /]# chmod -R 775 /mysqldata

解压MySQL源码包

[root@localhost soft]# tar -zxvf  mysql-boost-5.7.39.tar.gz
[root@localhost soft]# ls -lrt
总用量 3643996
drwxr-xr-x 34 7161 31415       4096  6月  8 16:48 mysql-5.7.39
-rw-------  1 root root    53243335 11月 15 22:24 mysql-boost-5.7.39.tar.gz

编译安装

[root@localhost mysql-5.7.39]# cmake . -DCMAKE_INSTALL_PREFIX=/mysqlsoft/mysql  -DMYSQL_DATADIR=/mysqldata/mysql  -DSYSCONFDIR=/mysqlsoft/mysql/mysql.sock  -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/soft/mysql-5.7.39/boost/boost_1_59_0 -DWITH_INNOBASE_STORAGE_ENGINE=1  -DWITH_PARTITION_STORAGE_ENGINE=1  -DWITH_FEDERATED_STORAGE_ENGINE=1  -DWITH_BLACKHOLE_STORAGE_ENGINE=1  -DWITH_MYISAM_STORAGE_ENGINE=1  -DENABLED_LOCAL_INFILE=1  -DENABLE_DTRACE=0  -DDEFAULT_CHARSET=utf8mb4  -DDEFAULT_COLLATION=utf8mb4_general_ci  -DWITH_EMBEDDED_SERVER=1
CMake Deprecation Warning at CMakeLists.txt:35 (CMAKE_POLICY):
  The OLD behavior for policy CMP0018 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:41 (CMAKE_POLICY):
  The OLD behavior for policy CMP0022 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:48 (CMAKE_POLICY):
  The OLD behavior for policy CMP0045 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:49 (CMAKE_POLICY):
  The OLD behavior for policy CMP0042 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Running cmake version 3.12.1
-- Found Git: /usr/bin/git (found version "2.27.0")
-- Configuring with MAX_INDEXES = 64U
CMake Warning (dev) at CMakeLists.txt:146 (PROJECT):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    CMAKE_PROJECT_VERSION
    CMAKE_PROJECT_VERSION_MAJOR
    CMAKE_PROJECT_VERSION_MINOR
    CMAKE_PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CMAKE_GENERATOR: Unix Makefiles
-- SIZEOF_VOIDP 8
-- MySQL 5.7.39
-- Packaging as: mysql-5.7.39-Linux-mips64el
-- DTRACE is disabled
-- Local boost dir /soft/mysql-5.7.39/boost/boost_1_59_0
-- Found /soft/mysql-5.7.39/boost/boost_1_59_0/boost/version.hpp
-- BOOST_VERSION_NUMBER is #define BOOST_VERSION 105900
-- BOOST_INCLUDE_DIR /soft/mysql-5.7.39/boost/boost_1_59_0
-- NUMA library missing or required version not available
-- ZLIB_VERSION (bundled) is 1.2.12
-- ZLIB_INCLUDE_DIR /soft/mysql-5.7.39/extra/zlib/zlib-1.2.12
-- ZLIB_LIBRARY zlib
-- OPENSSL_INCLUDE_DIR = /usr/include
-- OPENSSL_LIBRARY = /usr/lib64/libssl.so
-- CRYPTO_LIBRARY = /usr/lib64/libcrypto.so
-- OPENSSL_MAJOR_VERSION = 1
-- OPENSSL_MINOR_VERSION = 01
-- OPENSSL_FIX_VERSION = 01
-- SSL_LIBRARIES = /usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl
-- AWK_EXECUTABLE is /usr/bin/gawk
-- Found Git: /usr/bin/git
-- LIBEVENT_VERSION_STRING 2.1.11-stable
-- LIBEVENT_VERSION (bundled) 2.1.11
-- WITH_PROTOBUF=bundled
-- protobuf version is 2.6
-- You need to set WITH_CURL. This variable needs to point to curl library.
-- Creating LDAP authentication SASL client library.
-- Required SASL header is missing.Skipping the LDAP SASL client authentication plugin.
-- Library mysqlclient depends on OSLIBS -lpthread;m;rt;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl
-- MERGE_CONVENIENCE_LIBRARIES TARGET mysqlclient
-- MERGE_CONVENIENCE_LIBRARIES LIBS clientlib;dbug;strings;vio;mysys;mysys_ssl;zlib
-- MERGE_CONVENIENCE_LIBRARIES MYLIBS clientlib;dbug;strings;vio;mysys;mysys_ssl;zlib
-- RPC_INCLUDE_DIRS /usr/include/tirpc
-- Using Boost headers from /soft/mysql-5.7.39/boost/boost_1_59_0
-- Performing Test CXX_HAVE_SIGN_COMPARE
-- Performing Test CXX_HAVE_SIGN_COMPARE - Success
-- Performing Test CXX_HAVE_UNUSED_VARIABLE
-- Performing Test CXX_HAVE_UNUSED_VARIABLE - Success
-- MYSQLX - Text log of protobuf messages enabled
-- Performing Test HAVE_UNUSED_PARAMETER
-- Performing Test HAVE_UNUSED_PARAMETER - Success
-- Googletest was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source.
-- If you are inside a firewall, you may need to use an https proxy: export https_proxy=http://example.com:80
-- Performing Test HAVE_MISLEADING_INDENTATION
-- Performing Test HAVE_MISLEADING_INDENTATION - Success
-- Performing Test HAVE_NO_BUILTIN_MEMCMP
-- Performing Test HAVE_NO_BUILTIN_MEMCMP - Success
-- executable target mysqld debug_target /soft/debug/sql/mysqld
CMake Warning at cmake/bison.cmake:27 (MESSAGE):
  Bison executable not found in PATH
Call Stack (most recent call first):
  sql/CMakeLists.txt:603 (INCLUDE)


CMake Warning at cmake/bison.cmake:27 (MESSAGE):
  Bison executable not found in PATH
Call Stack (most recent call first):
  libmysqld/CMakeLists.txt:215 (INCLUDE)


-- Library mysqlserver depends on OSLIBS -lpthread;m;rt;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl;crypt
-- MERGE_CONVENIENCE_LIBRARIES TARGET mysqlserver
-- MERGE_CONVENIENCE_LIBRARIES LIBS dbug;strings;regex;mysys;mysys_ssl;vio;zlib;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl;crypt;archive_embedded;blackhole_embedded;csv_embedded;federated_embedded;heap_embedded;innobase_embedded;lz4_lib;myisam_embedded;myisammrg_embedded;partition_embedded;ngram_parser_embedded;sql_embedded
-- MERGE_CONVENIENCE_LIBRARIES MYLIBS dbug;strings;regex;mysys;mysys_ssl;vio;zlib;archive_embedded;blackhole_embedded;csv_embedded;federated_embedded;heap_embedded;innobase_embedded;lz4_lib;myisam_embedded;myisammrg_embedded;partition_embedded;ngram_parser_embedded;sql_embedded
-- library target mysqlserver debug_target /soft/debug/archive_output_directory/libmysqld.a
-- INSTALL mysqlclient.pc lib/pkgconfig
-- Skipping deb packaging on unsupported platform .
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- COMPILE_DEFINITIONS: _GNU_SOURCE;_FILE_OFFSET_BITS=64;HAVE_CONFIG_H;HAVE_TLSv13
-- CMAKE_C_FLAGS: -fPIC -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -ffp-contract=off  -Wall -Wextra -Wformat-security -Wvla -Wimplicit-fallthrough=2 -Wwrite-strings -Wdeclaration-after-statement
-- CMAKE_CXX_FLAGS: -fPIC -std=gnu++03 -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -ffp-contract=off  -Wall -Wextra -Wformat-security -Wvla -Wimplicit-fallthrough=2 -Woverloaded-virtual -Wno-unused-parameter
-- CMAKE_CXX_FLAGS_DEBUG: -DENABLED_DEBUG_SYNC -DSAFE_MUTEX
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -ffunction-sections -fdata-sections
-- CMAKE_CXX_FLAGS_RELEASE: -ffunction-sections -fdata-sections
-- CMAKE_CXX_FLAGS_MINSIZEREL: -ffunction-sections -fdata-sections
-- CMAKE_C_LINK_FLAGS:
-- CMAKE_CXX_LINK_FLAGS:
-- CMAKE_EXE_LINKER_FLAGS
-- CMAKE_MODULE_LINKER_FLAGS
-- CMAKE_SHARED_LINKER_FLAGS
-- Configuring done
-- Generating done
-- Build files have been written to: /soft/mysql-5.7.39




[root@localhost mysql-5.7.39]# make -j 4


[root@localhost mysql-5.7.39]# make install

-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/funcs_1/memory_tb3.txt
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/funcs_1/myisam_tb3.txt
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/funcs_1/ndb_tb3.txt
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/funcs_1/t3.txt
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/funcs_1/myisam_tb2.txt
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/funcs_1/myisam_tb4.txt
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/funcs_1/memory_tb4.txt
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/funcs_1/memory_tb2.txt
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/server8k-cert.pem
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/latin1.xml
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/bug16266.000001
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/replicated-bin.index
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/.mylogin.cnf
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/slave-relay-bin.000001
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/wl6219_55_innodb.frm
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/data_50722.zip
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/bug46565.ARZ
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/server-key-verify-pass.pem
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/server-key.pem
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/bug46565.frm
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/bug37631.MYI
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/server-cert-verify-fail.pem
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/bug21542698.dat
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/loaddata7.dat
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/expired-ca.pem
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/binlog_truncated_event.000001
-- Installing: /mysqlsoft/mysql/mysql-test/./std_data/loaddata_pair.dat
-- Installing: /mysqlsoft/mysql/./README-test
-- Up-to-date: /mysqlsoft/mysql/mysql-test/mtr
-- Up-to-date: /mysqlsoft/mysql/mysql-test/mysql-test-run
-- Installing: /mysqlsoft/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
-- Up-to-date: /mysqlsoft/mysql/mysql-test/lib/My/SafeProcess/my_safe_process
-- Installing: /mysqlsoft/mysql/mysql-test/lib/My/SafeProcess/Base.pm
-- Installing: /mysqlsoft/mysql/support-files/mysqld_multi.server
-- Installing: /mysqlsoft/mysql/support-files/mysql-log-rotate
-- Installing: /mysqlsoft/mysql/support-files/magic
-- Installing: /mysqlsoft/mysql/share/aclocal/mysql.m4
-- Installing: /mysqlsoft/mysql/support-files/mysql.server

配置mysql参数,只是设置几个简单的mysql运行参数

[mysql@localhost mysql]$ cat my.cnf
[mysqld]
basedir=/mysqlsoft/mysql
datadir=/mysqldata/mysql
bind-address=0.0.0.0
user=mysql
port=3306
log-error=/mysqldata/mysql/mysql.err
pid-file=/mysqldata/mysql/mysqld.pid
socket = /mysqlsoft/mysql/mysql.sock
character-set-server=utf8mb4
default-storage-engine=INNODB
explicit_defaults_for_timestamp = true
########innodb settings########
innodb_page_size = 8192
innodb_buffer_pool_size = 4G
innodb_buffer_pool_instances = 2
innodb_buffer_pool_load_at_startup = 1
innodb_buffer_pool_dump_at_shutdown = 1
innodb_lru_scan_depth = 2000
innodb_lock_wait_timeout = 5
innodb_io_capacity = 4000
innodb_io_capacity_max = 8000
innodb_flush_method = O_DIRECT
innodb_file_format = Barracuda
innodb_file_format_max = Barracuda
innodb_log_group_home_dir =/msyqldata/redolog/
innodb_undo_directory =/mysqldata/undolog/
innodb_undo_logs = 128
innodb_undo_tablespaces = 3
innodb_flush_nei***ors = 1
innodb_log_file_size = 1G
innodb_log_buffer_size = 16777216
innodb_purge_threads = 4
innodb_large_prefix = 1
innodb_thread_concurrency = 64
innodb_print_all_deadlocks = 1
innodb_strict_mode = 1
innodb_sort_buffer_size = 67108864

[root@localhost bin]# ./mysqld  --defaults-file=/mysqlsoft/mysql/my.cnf --initialize --basedir=/mysqlsoft/mysql --datadir=/mysqldata/mysql --user=mysql

[mysql@localhost mysql]$ tail -f mysql.err
 100 200 300 400 500 600 700 800 900 1000
 100 200 300 400 500 600 700 800 900 1000
2022-11-18T13:26:36.602330Z 0 [Warning] InnoDB: New log files created, LSN=39537
2022-11-18T13:26:36.741745Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2022-11-18T13:26:36.806980Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: a0976fe4-6744-11ed-8ede-0023a0002161.
2022-11-18T13:26:36.809665Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2022-11-18T13:26:37.348420Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2022-11-18T13:26:37.348462Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2022-11-18T13:26:37.350930Z 0 [Warning] CA certificate ca.pem is self signed.
2022-11-18T13:26:37.589677Z 1 [Note] A temporary password is generated for root@localhost: KuOS*vY&V1Dx


其中[Note] A temporary password is generated for root@localhost:后面跟的是mysql数据库登录的临时密码,各人安装生成的临时密码不一样。可以看到到日志文件没有报错,而且有了临时密码,表示初始化成功。

如果想服务能够部署自动支持安全连接,使用mysql_ssl_rsa_setup工具来创建缺省SSL与RSA文件

[root@localhost bin]#  ./mysql_ssl_rsa_setup --datadir=/mysqldata/mysql

配置环境变量

[root@localhost /]# vi /etc/profile
export MYSQL_HOME=/mysqlsoft/mysql/
export PATH=$PATH:$MYSQL_HOME/bin

[root@localhost /]# vi /etc/profile
[root@localhost /]# source /etc/profile

配置自动启动MySQL

[root@localhost /]# cp /mysqlsoft/mysql/support-files/mysql.server  /etc/init.d/mysqld
[root@localhost /]# chmod 755 /etc/init.d/mysqld
[root@localhost ~]# systemctl enable mysqld
mysqld.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig mysqld on

启动MySQL

[root@localhost /]# service mysqld start
Starting MySQL... SUCCESS!

登录MySQL并修改root用户密码

[root@localhost tmp]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.39

Copyright (c) 2000, 2022, 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>

发表评论

电子邮件地址不会被公开。