Monday, 24 June 2019

Install MySQL Server 8 Community Edition on CentOS 7

Install MySQL 8.0 Community Edition on CentOS 7

MySQL Server Community Edition (CE) is the free version of world's most popular open source database server. It is distributed under GPL License and supported by a large and active community of open source developers. There is also a commercial version of MySQL server, which is developed and maintained by Oracle Corporation.

In this article, we are installing MySQL server 8 community edition on CentOS 7 server.

This article does not address the usage of MySQL commands and SQL statements. Therefore, if you wish to learn MySQL architecture, commands and SQL statements, then we recommend you to read Murach's MySQL (3rd Edition) by Mike Murach & Associates.

 

This Article Provides:

     

    MySQL Server 8 Community Edition Features:

    Main features of MySQL Server CE are.

    • Supports SQL and NoSQL
    • Pluggable Storage Engine Architecture
    • MySQL Replication
    • MySQL InnoDB Cluster
    • MySQL Router
    • MySQL Partitioning
    • MySQL Workbench

    Checkout complete list of MySQL Server 8 features at MySQL official website.

     

    Environment Specification:

    We have configured a CentOS 7 virtual machine with following specifications.

    • CPU - 3.4 Ghz (2 cores)
    • Memory - 2 GB
    • Storage - 20 GB
    • Operating System - CentOS 7.6
    • Hostname – mysql-server.example.com
    • IP Address - 192.168.116.180/24

     

    Installing MySQL 8 Yum Repository in CentOS 7:

    Connect with mysql-server.example.com using ssh as root user.

    Download and install MySQL yum repository from MySQL official website.

    [root@mysql-server ~]# rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Retrieving https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm warning: /var/tmp/rpm-tmp.fJdAIJ: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql80-community-release-el7-3 ################################# [100%]

    Build cache for MySQL yum repository.

    [root@mysql-server ~]# yum makecache fast Loaded plugins: fastestmirror Determining fastest mirrors * base: ftp3.isra.edu.pk * extras: ftp3.isra.edu.pk * updates: ftp3.isra.edu.pk base | 3.6 kB 00:00 extras | 3.4 kB 00:00 mysql-connectors-community | 2.5 kB 00:00 mysql-tools-community | 2.5 kB 00:00 mysql80-community | 2.5 kB 00:00 updates | 3.4 kB 00:00 (1/5): mysql-connectors-community/x86_64/primary_db | 41 kB 00:00 (2/5): mysql-tools-community/x86_64/primary_db | 58 kB 00:00 (3/5): mysql80-community/x86_64/primary_db | 70 kB 00:01 (4/5): extras/7/x86_64/primary_db | 205 kB 00:01 (5/5): updates/7/x86_64/primary_db | 6.4 MB 00:15 Metadata Cache Created

     

    Installing MySQL Server 8 Community Edition on CentOS 7:

    We have added the MySQL yum repository, now we can install MySQL Server 8 Community Edition and relevant packages using yum command.

    [root@mysql-server ~]# yum install -y mysql-community-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp3.isra.edu.pk * extras: ftp3.isra.edu.pk * updates: ftp3.isra.edu.pk Resolving Dependencies --> Running transaction check ---> Package mysql-community-server.x86_64 0:8.0.16-2.el7 will be installed --> Processing Dependency: mysql-community-common(x86-64) = 8.0.16-2.el7 for package: mysql-community-server-8.0.16-2.el7.x86_64 --> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.16-2.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-community-server-8.0.16-2.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-community-server-8.0.16-2.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-community-server-8.0.16-2.el7.x86_64 --> Processing Dependency: /usr/bin/perl for package: mysql-community-server-8.0.16-2.el7.x86_64 --> Running transaction check ---> Package mysql-community-client.x86_64 0:8.0.16-2.el7 will be installed --> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.11 for package: mysql-community-client-8.0.16-2.el7.x86_64 ---> Package mysql-community-common.x86_64 0:8.0.16-2.el7 will be installed ---> Package net-tools.x86_64 0:2.0-0.24.20131004git.el7 will be installed ---> Package perl.x86_64 4:5.16.3-294.el7_6 will be installed --> Processing Dependency: perl-libs = 4:5.16.3-294.el7_6 for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-294.el7_6.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-294.el7_6.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 mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be obsoleted --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64 ---> Package mysql-community-libs.x86_64 0:8.0.16-2.el7 will be obsoleting ---> 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-4.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-294.el7_6 will be installed ---> Package perl-macros.x86_64 4:5.16.3-294.el7_6 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 mysql-community-libs-compat.x86_64 0:8.0.16-2.el7 will be obsoleting ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed ---> Package perl-Pod-Escapes.noarch 1:1.04-294.el7_6 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-libs x86_64 8.0.16-2.el7 mysql80-community 3.0 M replacing mariadb-libs.x86_64 1:5.5.60-1.el7_5 mysql-community-libs-compat x86_64 8.0.16-2.el7 mysql80-community 2.1 M replacing mariadb-libs.x86_64 1:5.5.60-1.el7_5 mysql-community-server x86_64 8.0.16-2.el7 mysql80-community 403 M Installing for dependencies: mysql-community-client x86_64 8.0.16-2.el7 mysql80-community 32 M mysql-community-common x86_64 8.0.16-2.el7 mysql80-community 575 k net-tools x86_64 2.0-0.24.20131004git.el7 base 306 k perl x86_64 4:5.16.3-294.el7_6 updates 8.0 M perl-Carp noarch 1.26-244.el7 base 19 k perl-Encode x86_64 2.51-7.el7 base 1.5 M perl-Exporter noarch 5.68-3.el7 base 28 k perl-File-Path noarch 2.09-2.el7 base 26 k perl-File-Temp noarch 0.23.01-3.el7 base 56 k perl-Filter x86_64 1.49-3.el7 base 76 k perl-Getopt-Long noarch 2.40-3.el7 base 56 k perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k perl-PathTools x86_64 3.40-5.el7 base 82 k perl-Pod-Escapes noarch 1:1.04-294.el7_6 updates 51 k perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k perl-Pod-Usage noarch 1.63-3.el7 base 27 k perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k perl-Socket x86_64 2.010-4.el7 base 49 k perl-Storable x86_64 2.45-3.el7 base 77 k perl-Text-ParseWords noarch 3.29-4.el7 base 14 k perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k perl-Time-Local noarch 1.2300-2.el7 base 24 k perl-constant noarch 1.27-2.el7 base 19 k perl-libs x86_64 4:5.16.3-294.el7_6 updates 688 k perl-macros x86_64 4:5.16.3-294.el7_6 updates 44 k perl-parent noarch 1:0.225-244.el7 base 12 k perl-podlators noarch 2.5.1-3.el7 base 112 k perl-threads x86_64 1.87-4.el7 base 49 k perl-threads-shared x86_64 1.43-6.el7 base 39 k Transaction Summary ================================================================================ Install 3 Packages (+30 Dependent packages) Total download size: 452 M Downloading packages: warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-common-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Public key for mysql-community-common-8.0.16-2.el7.x86_64.rpm is not installed (1/33): mysql-community-common-8.0.16-2.el7.x86_64.rpm | 575 kB 00:02 (2/33): mysql-community-libs-8.0.16-2.el7.x86_64.rpm | 3.0 MB 00:10 (3/33): mysql-community-libs-compat-8.0.16-2.el7.x86_64.rp | 2.1 MB 00:13 (4/33): perl-Carp-1.26-244.el7.noarch.rpm | 19 kB 00:01 (5/33): net-tools-2.0-0.24.20131004git.el7.x86_64.rpm | 306 kB 00:02 (6/33): perl-Exporter-5.68-3.el7.noarch.rpm | 28 kB 00:00 (7/33): perl-File-Path-2.09-2.el7.noarch.rpm | 26 kB 00:00 (8/33): perl-File-Temp-0.23.01-3.el7.noarch.rpm | 56 kB 00:00 (9/33): perl-Filter-1.49-3.el7.x86_64.rpm | 76 kB 00:00 (10/33): perl-Getopt-Long-2.40-3.el7.noarch.rpm | 56 kB 00:00 (11/33): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm | 38 kB 00:00 (12/33): perl-PathTools-3.40-5.el7.x86_64.rpm | 82 kB 00:00 (13/33): perl-Pod-Escapes-1.04-294.el7_6.noarch.rpm | 51 kB 00:01 (14/33): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm | 87 kB 00:01 (15/33): perl-Pod-Simple-3.28-4.el7.noarch.rpm | 216 kB 00:01 (16/33): perl-Pod-Usage-1.63-3.el7.noarch.rpm | 27 kB 00:00 (17/33): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm | 36 kB 00:00 (18/33): perl-Socket-2.010-4.el7.x86_64.rpm | 49 kB 00:00 (19/33): perl-Storable-2.45-3.el7.x86_64.rpm | 77 kB 00:00 (20/33): perl-Text-ParseWords-3.29-4.el7.noarch.rpm | 14 kB 00:00 (21/33): perl-Time-HiRes-1.9725-3.el7.x86_64.rpm | 45 kB 00:00 (22/33): perl-Time-Local-1.2300-2.el7.noarch.rpm | 24 kB 00:00 (23/33): perl-constant-1.27-2.el7.noarch.rpm | 19 kB 00:00 (24/33): perl-Encode-2.51-7.el7.x86_64.rpm | 1.5 MB 00:15 (25/33): perl-libs-5.16.3-294.el7_6.x86_64.rpm | 688 kB 00:05 (26/33): perl-parent-0.225-244.el7.noarch.rpm | 12 kB 00:00 (27/33): perl-macros-5.16.3-294.el7_6.x86_64.rpm | 44 kB 00:01 (28/33): perl-podlators-2.5.1-3.el7.noarch.rpm | 112 kB 00:00 (29/33): perl-threads-shared-1.43-6.el7.x86_64.rpm | 39 kB 00:00 (30/33): perl-threads-1.87-4.el7.x86_64.rpm | 49 kB 00:01 (31/33): perl-5.16.3-294.el7_6.x86_64.rpm | 8.0 MB 00:29 (32/33): mysql-community-client-8.0.16-2.el7.x86_64.rpm | 32 MB 02:07 (33/33): mysql-community-server-8.0.16-2.el7.x86_64.rpm | 403 MB 17:05 -------------------------------------------------------------------------------- Total 440 kB/s | 452 MB 17:32 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-3.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : mysql-community-common-8.0.16-2.el7.x86_64 1/34 Installing : mysql-community-libs-8.0.16-2.el7.x86_64 2/34 Installing : mysql-community-client-8.0.16-2.el7.x86_64 3/34 Installing : 1:perl-parent-0.225-244.el7.noarch 4/34 Installing : perl-HTTP-Tiny-0.033-3.el7.noarch 5/34 Installing : perl-podlators-2.5.1-3.el7.noarch 6/34 Installing : perl-Pod-Perldoc-3.20-4.el7.noarch 7/34 Installing : 1:perl-Pod-Escapes-1.04-294.el7_6.noarch 8/34 Installing : perl-Encode-2.51-7.el7.x86_64 9/34 Installing : perl-Text-ParseWords-3.29-4.el7.noarch 10/34 Installing : perl-Pod-Usage-1.63-3.el7.noarch 11/34 Installing : 4:perl-libs-5.16.3-294.el7_6.x86_64 12/34 Installing : 4:perl-macros-5.16.3-294.el7_6.x86_64 13/34 Installing : perl-Storable-2.45-3.el7.x86_64 14/34 Installing : perl-Exporter-5.68-3.el7.noarch 15/34 Installing : perl-constant-1.27-2.el7.noarch 16/34 Installing : perl-Time-Local-1.2300-2.el7.noarch 17/34 Installing : perl-Socket-2.010-4.el7.x86_64 18/34 Installing : perl-Carp-1.26-244.el7.noarch 19/34 Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 20/34 Installing : perl-PathTools-3.40-5.el7.x86_64 21/34 Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64 22/34 Installing : 1:perl-Pod-Simple-3.28-4.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 : perl-Getopt-Long-2.40-3.el7.noarch 29/34 Installing : 4:perl-5.16.3-294.el7_6.x86_64 30/34 Installing : net-tools-2.0-0.24.20131004git.el7.x86_64 31/34 Installing : mysql-community-server-8.0.16-2.el7.x86_64 32/34 Installing : mysql-community-libs-compat-8.0.16-2.el7.x86_64 33/34 Erasing : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 34/34 Verifying : perl-HTTP-Tiny-0.033-3.el7.noarch 1/34 Verifying : mysql-community-libs-8.0.16-2.el7.x86_64 2/34 Verifying : perl-threads-shared-1.43-6.el7.x86_64 3/34 Verifying : perl-Storable-2.45-3.el7.x86_64 4/34 Verifying : 1:perl-Pod-Escapes-1.04-294.el7_6.noarch 5/34 Verifying : perl-Exporter-5.68-3.el7.noarch 6/34 Verifying : perl-constant-1.27-2.el7.noarch 7/34 Verifying : perl-PathTools-3.40-5.el7.x86_64 8/34 Verifying : mysql-community-common-8.0.16-2.el7.x86_64 9/34 Verifying : 1:perl-parent-0.225-244.el7.noarch 10/34 Verifying : mysql-community-libs-compat-8.0.16-2.el7.x86_64 11/34 Verifying : 4:perl-libs-5.16.3-294.el7_6.x86_64 12/34 Verifying : perl-File-Temp-0.23.01-3.el7.noarch 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 : 4:perl-macros-5.16.3-294.el7_6.x86_64 16/34 Verifying : perl-Socket-2.010-4.el7.x86_64 17/34 Verifying : perl-Carp-1.26-244.el7.noarch 18/34 Verifying : net-tools-2.0-0.24.20131004git.el7.x86_64 19/34 Verifying : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 20/34 Verifying : perl-Scalar-List-Utils-1.27-248.el7.x86_64 21/34 Verifying : mysql-community-server-8.0.16-2.el7.x86_64 22/34 Verifying : perl-Pod-Usage-1.63-3.el7.noarch 23/34 Verifying : perl-Encode-2.51-7.el7.x86_64 24/34 Verifying : perl-Pod-Perldoc-3.20-4.el7.noarch 25/34 Verifying : perl-podlators-2.5.1-3.el7.noarch 26/34 Verifying : mysql-community-client-8.0.16-2.el7.x86_64 27/34 Verifying : perl-threads-1.87-4.el7.x86_64 28/34 Verifying : perl-Filter-1.49-3.el7.x86_64 29/34 Verifying : perl-Getopt-Long-2.40-3.el7.noarch 30/34 Verifying : perl-Text-ParseWords-3.29-4.el7.noarch 31/34 Verifying : 4:perl-5.16.3-294.el7_6.x86_64 32/34 Verifying : perl-File-Path-2.09-2.el7.noarch 33/34 Verifying : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 34/34 Installed: mysql-community-libs.x86_64 0:8.0.16-2.el7 mysql-community-libs-compat.x86_64 0:8.0.16-2.el7 mysql-community-server.x86_64 0:8.0.16-2.el7 Dependency Installed: mysql-community-client.x86_64 0:8.0.16-2.el7 mysql-community-common.x86_64 0:8.0.16-2.el7 net-tools.x86_64 0:2.0-0.24.20131004git.el7 perl.x86_64 4:5.16.3-294.el7_6 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-294.el7_6 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-4.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-294.el7_6 perl-macros.x86_64 4:5.16.3-294.el7_6 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 Replaced: mariadb-libs.x86_64 1:5.5.60-1.el7_5 Complete!

    MySQL service is automatically enabled by the installer. Therefore, we are only required to start mysqld.service once.

    [root@mysql-server ~]# systemctl start mysqld.service

    During first start-up, MySQL service generates a temporary password in /var/log/mysqld.log file.

    Retrieve this password using following command.

    [root@mysql-server ~]# grep 'temporary password' /var/log/mysqld.log 2019-06-24T14:23:17.605740Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: B4gqaLFg6p_Y

    Note down this password, we will use it later.

     

    Securing MySQL Server 8 Community Edition:

    To configure and secure our MySQL database instance, we can use mysql_secure_installation command. We are also required to use temporary password to set a new password for root user.

    [root@mysql-server ~]# mysql_secure_installation Securing the MySQL server deployment. Enter password for user root: The existing password for the user account root has expired. Please set a new password. New password: Re-enter new password: The 'validate_password' component is installed on the server. The subsequent steps will run with the existing configuration of the component. Using existing password for root. Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y Success. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y Success. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y Success. All done!

    Connect with MySQL database server using mysql command as root user.

    [root@mysql-server ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.16 MySQL Community Edition - GPL Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.01 sec) mysql>

    We have successfully installed MySQL Server 8 Community Edition on CentOS 7 server.

    Install MySQL Server 8 Community Edition on CentOS 7


    YOU MIGHT ALSO LIKE:

    No comments:

    Post a Comment