龍芯麒麟原始碼編譯MySQL生成軟體包進行安裝
檢視是否已安裝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 # 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)
解壓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 /]# mv mysql-5.7.39 mysql5_7 [root@localhost /]# cd mysql5_7/ [root@localhost mysql5_7]# ls -lrt 總用量 560 -rw-r--r-- 1 7161 31415 88 6月 8 16:37 VERSION -rw-r--r-- 1 7161 31415 566 6月 8 16:37 README -rw-r--r-- 1 7161 31415 255074 6月 8 16:37 LICENSE -rw-r--r-- 1 7161 31415 333 6月 8 16:37 INSTALL -rw-r--r-- 1 7161 31415 67369 6月 8 16:37 Doxyfile-perfschema -rw-r--r-- 1 7161 31415 25144 6月 8 16:37 configure.cmake -rw-r--r-- 1 7161 31415 14554 6月 8 16:37 config.h.cmake -rw-r--r-- 1 7161 31415 29939 6月 8 16:37 CMakeLists.txt drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 source_downloads drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 libservices drwxr-xr-x 3 7161 31415 4096 6月 8 16:47 libmysqld drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 libmysql drwxr-xr-x 3 7161 31415 4096 6月 8 16:47 libbinlogstandalone drwxr-xr-x 5 7161 31415 4096 6月 8 16:47 libbinlogevents drwxr-xr-x 5 7161 31415 4096 6月 8 16:47 include drwxr-xr-x 8 7161 31415 4096 6月 8 16:47 extra drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 Docs drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 dbug drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 cmake drwxr-xr-x 6 7161 31415 4096 6月 8 16:47 client drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 BUILD drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 sql-common drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 regex drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 rapid drwxr-xr-x 18 7161 31415 4096 6月 8 16:47 plugin drwxr-xr-x 10 7161 31415 4096 6月 8 16:47 packaging drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 mysys_ssl drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 mysys drwxr-xr-x 10 7161 31415 4096 6月 8 16:47 mysql-test drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 testclients drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 support-files drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 strings drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 win drwxr-xr-x 3 7161 31415 4096 6月 8 16:47 vio drwxr-xr-x 5 7161 31415 4096 6月 8 16:47 unittest drwxr-xr-x 8 7161 31415 28672 6月 8 16:47 sql drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 scripts drwxr-xr-x 13 7161 31415 4096 6月 8 16:48 storage drwxr-xr-x 2 7161 31415 4096 6月 8 16:48 man drwxr-xr-x 3 7161 31415 4096 6月 8 16:48 boost
建立編譯目錄
[root@localhost mysql5_7]# mkdir bld [root@localhost mysql5_7]# cd bld [root@localhost bld]# pwd /mysql5_7/bld [root@localhost bld]# cd / [root@localhost /]# ls -lrt 總用量 52088 drwxr-xr-x 2 root root 4096 3月 27 2020 srv lrwxrwxrwx 1 root root 8 3月 27 2020 sbin -> usr/sbin drwxr-xr-x 2 root root 4096 3月 27 2020 media lrwxrwxrwx 1 root root 9 3月 27 2020 lib64 -> usr/lib64 lrwxrwxrwx 1 root root 7 3月 27 2020 lib -> usr/lib lrwxrwxrwx 1 root root 7 3月 27 2020 bin -> usr/bin drwx------. 2 root root 16384 11月 15 12:13 lost+found drwxr-xr-x 12 root root 4096 11月 15 12:21 usr drwxrwxrwx 2 root root 4096 11月 15 12:28 box drwx--x--x 3 root root 4096 11月 15 12:32 sudo dr-xr-xr-x. 6 root root 4096 11月 15 12:33 boot drwxr-xr-x 24 root root 4096 11月 15 12:42 var drwxr-xr-x 7 root root 4096 11月 15 12:42 opt dr-xr-xr-x 233 root root 0 11月 15 19:09 proc drwxr-xr-x. 4 root root 4096 11月 15 21:09 backup dr-xr-xr-x 13 root root 0 11月 15 22:35 sys drwxr-xr-x 3 root root 4096 11月 15 22:55 mnt drwxr-xr-x 17 root root 5080 11月 15 22:55 dev drwxrwxr-x 3 mysql mysql 4096 11月 15 23:37 mysqlsoft drwx------ 5 root root 4096 11月 18 19:40 soft drwxr-xr-x 3 root root 4096 11月 18 21:06 home drwxr-xr-x 45 root root 1360 11月 18 21:06 run drwxrwxr-x 5 mysql mysql 4096 11月 18 21:24 mysqldata drwxr-xr-x 157 root root 12288 11月 18 21:31 etc dr-xr-x--- 17 root root 4096 11月 18 21:58 root -rw------- 1 root root 53243335 11月 18 22:24 mysql-boost-5.7.39.tar.gz drwxrwxrwt 14 root root 320 11月 18 22:26 tmp drwxr-xr-x 35 7161 31415 4096 11月 18 22:26 mysql5_7
建立MySQL安裝目錄
[root@localhost /]# mkdir -p mysql57soft/msyql [root@localhost /]# mkdir -p msyql57data/mysql [root@localhost /]# chown -R mysql:mysql mysql57* [root@localhost /]# ls -lrt 總用量 52096 drwxr-xr-x 2 root root 4096 3月 27 2020 srv lrwxrwxrwx 1 root root 8 3月 27 2020 sbin -> usr/sbin drwxr-xr-x 2 root root 4096 3月 27 2020 media lrwxrwxrwx 1 root root 9 3月 27 2020 lib64 -> usr/lib64 lrwxrwxrwx 1 root root 7 3月 27 2020 lib -> usr/lib lrwxrwxrwx 1 root root 7 3月 27 2020 bin -> usr/bin drwx------. 2 root root 16384 11月 15 12:13 lost+found drwxr-xr-x 12 root root 4096 11月 15 12:21 usr drwxrwxrwx 2 root root 4096 11月 15 12:28 box drwx--x--x 3 root root 4096 11月 15 12:32 sudo dr-xr-xr-x. 6 root root 4096 11月 15 12:33 boot drwxr-xr-x 24 root root 4096 11月 15 12:42 var drwxr-xr-x 7 root root 4096 11月 15 12:42 opt dr-xr-xr-x 235 root root 0 11月 15 19:09 proc drwxr-xr-x. 4 root root 4096 11月 15 21:09 backup dr-xr-xr-x 13 root root 0 11月 15 22:35 sys drwxr-xr-x 3 root root 4096 11月 15 22:55 mnt drwxr-xr-x 17 root root 5080 11月 15 22:55 dev drwxrwxr-x 3 mysql mysql 4096 11月 15 23:37 mysqlsoft drwx------ 5 root root 4096 11月 18 19:40 soft drwxr-xr-x 3 root root 4096 11月 18 21:06 home drwxr-xr-x 45 root root 1360 11月 18 21:06 run drwxrwxr-x 5 mysql mysql 4096 11月 18 21:24 mysqldata drwxr-xr-x 157 root root 12288 11月 18 21:31 etc dr-xr-x--- 17 root root 4096 11月 18 21:58 root -rw------- 1 root root 53243335 11月 18 22:24 mysql-boost-5.7.39.tar.gz drwxrwxrwt 14 root root 320 11月 18 22:26 tmp drwxr-xr-x 35 7161 31415 4096 11月 18 22:26 mysql5_7 drwx------ 3 mysql mysql 4096 11月 18 22:30 mysql57soft drwx------ 3 root root 4096 11月 18 22:30 msyql57data [root@localhost /]# cd mysql5_7/ [root@localhost mysql5_7]# ls -lrt 總用量 564 -rw-r--r-- 1 7161 31415 88 6月 8 16:37 VERSION -rw-r--r-- 1 7161 31415 566 6月 8 16:37 README -rw-r--r-- 1 7161 31415 255074 6月 8 16:37 LICENSE -rw-r--r-- 1 7161 31415 333 6月 8 16:37 INSTALL -rw-r--r-- 1 7161 31415 67369 6月 8 16:37 Doxyfile-perfschema -rw-r--r-- 1 7161 31415 25144 6月 8 16:37 configure.cmake -rw-r--r-- 1 7161 31415 14554 6月 8 16:37 config.h.cmake -rw-r--r-- 1 7161 31415 29939 6月 8 16:37 CMakeLists.txt drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 source_downloads drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 libservices drwxr-xr-x 3 7161 31415 4096 6月 8 16:47 libmysqld drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 libmysql drwxr-xr-x 3 7161 31415 4096 6月 8 16:47 libbinlogstandalone drwxr-xr-x 5 7161 31415 4096 6月 8 16:47 libbinlogevents drwxr-xr-x 5 7161 31415 4096 6月 8 16:47 include drwxr-xr-x 8 7161 31415 4096 6月 8 16:47 extra drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 Docs drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 dbug drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 cmake drwxr-xr-x 6 7161 31415 4096 6月 8 16:47 client drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 BUILD drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 sql-common drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 regex drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 rapid drwxr-xr-x 18 7161 31415 4096 6月 8 16:47 plugin drwxr-xr-x 10 7161 31415 4096 6月 8 16:47 packaging drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 mysys_ssl drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 mysys drwxr-xr-x 10 7161 31415 4096 6月 8 16:47 mysql-test drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 testclients drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 support-files drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 strings drwxr-xr-x 2 7161 31415 4096 6月 8 16:47 win drwxr-xr-x 3 7161 31415 4096 6月 8 16:47 vio drwxr-xr-x 5 7161 31415 4096 6月 8 16:47 unittest drwxr-xr-x 8 7161 31415 28672 6月 8 16:47 sql drwxr-xr-x 4 7161 31415 4096 6月 8 16:47 scripts drwxr-xr-x 13 7161 31415 4096 6月 8 16:48 storage drwxr-xr-x 2 7161 31415 4096 6月 8 16:48 man drwxr-xr-x 3 7161 31415 4096 6月 8 16:48 boost drwx------ 2 root root 4096 11月 18 22:26 bld [root@localhost mysql5_7]# cd bld [root@localhost bld]# ls -lrt 總用量 0 [root@localhost bld]# pwd /mysql5_7/bld
編譯安裝
預編譯
cmake .. -DCMAKE_INSTALL_PREFIX=/mysql57soft/mysql -DMYSQL_DATADIR=/mysql57data/mysql -DSYSCONFDIR=/mysql57soft/mysql/mysql.sock -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/mysql5_7/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 --build . --config relwithdebinfo --target package [ 96%] Building CXX object sql/CMakeFiles/sql.dir/mf_iocache.cc.o [ 96%] Building CXX object sql/CMakeFiles/sql.dir/mysqld.cc.o [ 96%] Building CXX object sql/CMakeFiles/sql.dir/mysqld_thd_manager.cc.o [ 96%] Building CXX object sql/CMakeFiles/sql.dir/protocol_callback.cc.o [ 96%] Built target mysqlserver [ 96%] Building CXX object sql/CMakeFiles/sql.dir/signal_handler.cc.o Scanning dependencies of target mysqltest_embedded [ 96%] Building CXX object libmysqld/examples/CMakeFiles/mysqltest_embedded.dir/__/__/client/mysqltest.cc.o [ 96%] Building CXX object sql/CMakeFiles/sql.dir/sql_audit.cc.o [ 96%] Building CXX object sql/CMakeFiles/sql.dir/sql_client.cc.o Scanning dependencies of target mysql_embedded [ 96%] Building CXX object libmysqld/examples/CMakeFiles/mysql_embedded.dir/__/__/client/completion_hash.cc.o [ 96%] Building CXX object libmysqld/examples/CMakeFiles/mysql_embedded.dir/__/__/client/mysql.cc.o [ 96%] Linking CXX executable mysqltest_embedded [ 96%] Building CXX object libmysqld/examples/CMakeFiles/mysql_embedded.dir/__/__/client/readline.cc.o [ 96%] Linking CXX executable mysql_embedded [ 96%] Built target mysqltest_embedded Scanning dependencies of target mysql_client_test_embedded [ 96%] Building C object libmysqld/examples/CMakeFiles/mysql_client_test_embedded.dir/__/__/testclients/mysql_client_test.c.o [ 96%] Built target mysql_embedded [ 96%] Building CXX object sql/CMakeFiles/sql.dir/srv_session.cc.o [ 96%] Building CXX object sql/CMakeFiles/sql.dir/srv_session_service.cc.o [ 96%] Building CXX object sql/CMakeFiles/sql.dir/srv_session_info_service.cc.o [ 96%] Building CXX object sql/CMakeFiles/sql.dir/auth/sha2_password_common.cc.o [ 97%] Building CXX object sql/CMakeFiles/sql.dir/mysqld_daemon.cc.o [ 97%] Linking CXX static library ../archive_output_directory/libsql.a [ 97%] Built target sql Scanning dependencies of target mysqld Scanning dependencies of target pfs_connect_attr-t [ 97%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o [ 97%] Building CXX object storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/__/__/__/sql/sql_builtin.cc.o [ 97%] Linking CXX executable mysqld [ 97%] Building CXX object storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/pfs_connect_attr-t.cc.o [ 98%] Building C object storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/__/__/__/mysys/string.c.o [ 98%] Linking CXX executable pfs_connect_attr-t [100%] Linking CXX executable mysql_client_test_embedded [100%] Built target mysqld [100%] Built target pfs_connect_attr-t [100%] Built target mysql_client_test_embedded Run CPack packaging tool... CPack: Create package using TGZ CPack: Install projects CPack: - Run preinstall target for: MySQL CPack: - Install project: MySQL CPack: Create package CPack: - package: /mysql5_7/bld/mysql-5.7.39-linux-mips64el.tar.gz generated.
使用編譯的軟體包安裝MySQL
[root@localhost/] tar -zxvf /mysql5_7/bld/mysql-5.7.39-linux-mips64el.tar.gz [root@localhost/] chown -R mysql:mysql mysql_5_7_39 [msyql@localhost/]cd mysql_5_7_39
配置mysql引數,只是設定幾個簡單的mysql執行引數
[mysql@localhost mysql_5_7_39]$ vi my.cnf [mysqld] basedir=/mysql57soft/mysql datadir=/mysql57data/mysql bind-address=0.0.0.0 user=mysql port=3307 log-error=/mysql57data/mysql/mysql.err pid-file=/mysql57data/mysql/mysqld.pid socket = /mysql_5_7_39/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 = 2G innodb_buffer_pool_instances = 1 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 =/mysql57data/redolog/ innodb_undo_directory =/mysql57data/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 [client] port=3307 socket = /mysql_5_7_39/mysql.sock
[root@localhost bin]# ./mysqld --defaults-file=/mysql_5_7_39/my.cnf --initialize --basedir=/mysql_5_7_39 --datadir=/mysql57data/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-18T16:11:40.704291Z 0 [Warning] InnoDB: New log files created, LSN=39537 2022-11-18T16:11:40.837945Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2022-11-18T16:11:40.903126Z 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: afe493ab-675b-11ed-8fe7-0023a0002161. 2022-11-18T16:11:40.905754Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2022-11-18T16:11:41.512271Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher. 2022-11-18T16:11:41.512309Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher. 2022-11-18T16:11:41.513362Z 0 [Warning] CA certificate ca.pem is self signed. 2022-11-18T16:11:41.752239Z 1 [Note] A temporary password is generated for root@localhost: g)Pnh/m(24IZ
其中[Note] A temporary password is generated for root@localhost:後面跟的是mysql資料庫登入的臨時密碼,各人安裝生成的臨時密碼不一樣。可以看到到日誌檔案沒有報錯,而且有了臨時密碼,表示初始化成功。
如果想服務能夠部署自動支援安全連線,使用mysql_ssl_rsa_setup工具來建立預設SSL與RSA檔案
[root@localhost bin]# ./mysql_ssl_rsa_setup --datadir=/mysql57data/mysql [root@localhost bin]# mysqld_safe --defaults-file=/mysql_5_7_39/my.cnf --user=mysql & [2] 98394 [root@localhost bin]# 2022-11-18T16:23:50.107056Z mysqld_safe Logging to '/mysql57data/mysql/mysql.err'. 2022-11-18T16:23:50.154854Z mysqld_safe Starting mysqld daemon with databases from /mysql57data/mysql [root@localhost bin]# netstat -ltnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 98228/mysqld tcp 0 0 0.0.0.0:3307 0.0.0.0:* LISTEN 98924/mysqld tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 3919/rpcbind tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 4934/dnsmasq tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 4530/sshd: /usr/sbi tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4521/cupsd tcp6 0 0 :::111 :::* LISTEN 3919/rpcbind tcp6 0 0 :::22 :::* LISTEN 4530/sshd: /usr/sbi tcp6 0 0 ::1:631 :::* LISTEN 4521/cupsd
配置環境變數
[root@localhost /]# vi /etc/profile export MYSQL_HOME=/mysql57soft/mysql/ export PATH=$PATH:$MYSQL_HOME/bin [root@localhost /]# vi /etc/profile [root@localhost /]# source /etc/profile
配置自動啟動MySQL
[root@localhost /]# cp /mysql57soft/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@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>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-2932040/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 龍芯原始碼編譯MySQL原始碼編譯MySql
- 如何編譯安裝原始碼包軟體編譯原始碼
- 原始碼包編譯安裝MySQL 5.6指令碼原始碼編譯MySql指令碼
- 原始碼編譯安裝MySQL 5.7.9原始碼編譯MySql
- 【轉】MySQL原始碼編譯安裝MySql原始碼編譯
- 【Linux】Linux軟體安裝管理3 編譯安裝原始碼軟體Linux編譯原始碼
- MySQL 5.6原始碼編譯安裝流程MySql原始碼編譯
- Greenplum_原始碼編譯安裝和RPM包安裝原始碼編譯
- 阿里雲mysql原始碼編譯安裝阿里MySql原始碼編譯
- MySQL5.7.16原始碼編譯安裝MySql原始碼編譯
- CentOS 7 原始碼編譯安裝 Mysql 5.7CentOS原始碼編譯MySql
- MySQL 5.7.9原始碼編譯安裝說明MySql原始碼編譯
- CentOS 6.5 原始碼編譯安裝 MySQL 5.5 5.6CentOS原始碼編譯MySql
- MySQL-5.6.29原始碼編譯安裝記錄MySql原始碼編譯
- CentOS 6.7下MySQL 5.6原始碼編譯安裝CentOSMySql原始碼編譯
- CentOS 6.7下原始碼編譯安裝MySQL 5.7.5CentOS原始碼編譯MySql
- 麒麟系統開發筆記(三):從Qt原始碼編譯安裝之編譯安裝Qt5.12筆記QT原始碼編譯
- 原始碼編譯安裝Redis原始碼編譯Redis
- LAMP原始碼編譯安裝LAMP原始碼編譯
- 《linux原始碼包的編譯安裝》RHEL6Linux原始碼編譯
- Mysql5.6 for Centos6.5原始碼編譯安裝MySqlCentOS原始碼編譯
- mysql5.0資料庫原始碼編譯安裝MySql資料庫原始碼編譯
- 【Redis】原始碼編譯二進位制包Redis原始碼編譯
- 原始碼編譯安裝的原理原始碼編譯
- zabbix agent原始碼編譯安裝原始碼編譯
- 原始碼包安裝mysql5.1原始碼MySql
- GDB 除錯 Mysql 實戰(一)原始碼編譯安裝除錯MySql原始碼編譯
- 原始碼編譯MySQL Cluster7.2.15安裝過程原始碼編譯MySql
- mysql5.5資料庫cmake原始碼編譯安裝MySql資料庫原始碼編譯
- Linux下原始碼編譯方式安裝MySQL5.5Linux原始碼編譯MySql
- 風河軟體安裝包編號
- 龍芯的go之路(一)-在龍芯中安裝goGo
- 編譯安裝mysql編譯MySql
- nginx原始碼編譯安裝(詳解)Nginx原始碼編譯
- php-7.1.0原始碼編譯安裝PHP原始碼編譯
- 詳解LAMP原始碼編譯安裝LAMP原始碼編譯
- LAMP原始碼編譯安裝配置+wordpressLAMP原始碼編譯
- lnmp環境安裝-原始碼編譯LNMP原始碼編譯