MySQL Tutorials - Herong's Tutorial Examples - v4.46, by Herong Yang
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 =================================================================== Installing: mysql-server x86_64 8.0.17-3.module_el8.0.0 AppStream 22 M Installing dependencies: mariadb-connector-c-config 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 ... Installed: mysql-server-8.0.17-3.module_el8.0.0.x86_64 mariadb-connector-c-config-3.0.7-1.el8.noarch mecab-0.996-1.module_el8.0.0+41+ca30bab6.9.x86_64 mysql-8.0.17-3.module_el8.0.0.x86_64 mysql-common-8.0.17-3.module_el8.0.0.x86_64 mysql-errmsg-8.0.17-3.module_el8.0.0.x86_64 protobuf-lite-3.5.0-7.el8.x86_64 Complete!
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
MySQL Introduction and Installation
Introduction of MySQL Programs
Perl Programs and MySQL Servers
Java Programs and MySQL Servers
Character Strings and Bit Strings
Table Column Types for Different Types of Values
Using DDL to Create Tables and Indexes
Using DML to Insert, Update and Delete Records
Using SELECT to Query Database
Window Functions for Statistical Analysis
Use Index for Better Performance
Transaction Management and Isolation Levels
Defining and Calling Stored Procedures
Variables, Loops and Cursors Used in Stored Procedures
System, User-Defined and Stored Procedure Variables
Storage Engines in MySQL Server
InnoDB Storage Engine - Primary and Secondary Indexes
Performance Tuning and Optimization
►Installing MySQL Server on Linux
►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
"Multiple files found for the same tablespace ID" Error