MySQL Community
Server is a free and open source version of MySQL Database management System. It
is widely used for database management in LAMP stack like servers and used in
web applications to store and retrieve data from database.
This
article describes How to Install MySQL Community Server 8 on CentOS7.
Step 1. Setup MySQL Repository: Run
the following command to setup MySQL official repository:
[root@linuxcnf
~]# yum install -y
https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
Loaded
plugins: fastestmirror
……………………
Installed:
mysql80-community-release.noarch 0:el7-3
Complete!
[root@linuxcnf
~]#
|
Step 2. MySQL Packages Installation: Run
the following command to install MySQL Community Server and it’s dependencies
from MySQL official repository:
[root@linuxcnf
~]# yum install mysql-community-server -y
Loaded
plugins: fastestmirror
…………………….
Installed:
mysql-community-libs.x86_64 0:8.0.18-1.el7 mysql-community-libs-compat.x86_64
0:8.0.18-1.el7 mysql-community-server.x86_64
0:8.0.18-1.el7
Dependency
Installed:
mysql-community-client.x86_64
0:8.0.18-1.el7
mysql-community-common.x86_64 0:8.0.18-1.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.64-1.el7
Complete!
[root@linuxcnf
~]#
|
Step 3. Start MySQL Service: Run the
following commands to start the MySQL Server and enable services to auto start
on reboot:
[root@linuxcnf
~]# systemctl
enable mysqld; systemctl start mysqld
[root@linuxcnf
~]#
|
Step 4. Get Temporary Password: Run
the following command to grep temporary password from MySQL Log file
/var/log/mysqld.log
[root@linuxcnf
~]# cat /var/log/mysqld.log |grep password
2019-11-28T18:08:16.472219Z
5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost:
zYjxUs2cyE(#
[root@linuxcnf
~]#
|
Step 5. Verify the installation: Run
the following command to check installation by check installed version of MySQL
Server:
[root@linuxcnf
~]# mysql --version
mysql Ver 8.0.18 for Linux on x86_64 (MySQL
Community Server - GPL)
[root@linuxcnf
~]#
|
Done!!!
MySQL Community Server 8 is installed successfully and ready for use:
No comments:
Post a Comment