Install MySQL Database Server on CentOS

This section provides a tutorial example on how to install MySQL 8.0 server on CentOS 8 systems using 'dnf/yum' as the package manager.

If you want to use MySQL database server on CentOS Linux systems, you can follow what I did on my CentOS 8 computer:

1. Login as "herong", who has admin privileges.

2. Run "dnf search" to find available MySQL packages. I see "mysql-server" and some related modules available for installation:

herong$ dnf search mysql

mysql.x86_64 : MySQL client programs and shared libraries
grafana-mysql.x86_64 : Grafana mysql datasource
postfix-mysql.x86_64 : Postfix MySQL map support
rsyslog-mysql.x86_64 : MySQL support for rsyslog
dovecot-mysql.x86_64 : MySQL back end for dovecot
perl-DBD-MySQL.x86_64 : A MySQL interface for Perl
freeradius-mysql.x86_64 : MySQL support for freeradius
mysql-server.x86_64 : The MySQL server and related files
mysql-test.x86_64 : The test suite distributed with MySQL

3. Install the "mysql-server" package:

herong$ sudo dnf install mysql-server

 Package            Arch   Version                  Repo       Size
 mysql-server       x86_64 8.0.17-3.module_el8.0.0  AppStream  22 M
Installing dependencies:
                    noarch 3.0.7-1.el8              AppStream  13 k
 mecab              x86_64 0.996-1.module_el8.0.0   AppStream 397 k
 mysql              x86_64 8.0.17-3.module_el8.0.0  AppStream  11 M
 mysql-common       x86_64 8.0.17-3.module_el8.0.0  AppStream 143 k
 mysql-errmsg       x86_64 8.0.17-3.module_el8.0.0  AppStream 557 k
 protobuf-lite      x86_64 3.5.0-7.el8              AppStream 150 k
Enabling module streams:
 mysql                     8.0



3. Verify the "mysql" package:

herong$ mysql --version

mysql  Ver 8.0.17 for Linux on x86_64 (Source distribution)

Cool! I have installed the "mysql-server" 8.0 on my CentOS computer without any issues. And the MySQL client program "mysql" is working. See next tutorial on how to start and stop MySQL server on CentOS systems.

Table of Contents

 About This Book

 Introduction to Linux Systems

 Process Management

 Files and Directories

 Running Apache HTTP Server (httpd) on Linux Systems

 Running Apache Tomcat on Linux Systems

 Running PHP Scripts on Linux Systems

Running MySQL Database Server on Linux Systems

Install MySQL Database Server on CentOS

 Manage MySQL Server 'mysqld' on CentOS

 Set MySQL Server "root" Password on CentOS

 MySQL Server File Locations on CentOS

 MySQL Server Data Backups on CentOS

 MySQL Server Log Files on CentOS

 MySQL Server Socket Connection on CentOS

 MySQL Server TCP/IP Connection on CentOS

 Open Firewall for MySQL Server on CentOS

 "Server sent charset unknown to the client" Error

 Performance of Inserting Integers to MySQL Database

 Performance Comparison of Inserting Integers vs. Strings

 Running Python Scripts on Linux Systems

 Conda - Environment and Package Manager

 GCC - C/C++ Compiler

 OpenJDK - Open-Source JDK

 Graphics Environments on Linux

 SquirrelMail - Webmail in PHP

 Tools and Utilities


 Full Version in PDF/EPUB