Reference commands for install and setup of mysql / mariadb on red hat distros like CentOS.
The below commands install the server, enable the database service to start on boot, setup the database service and finally start the service.
yum install mariadb-server mariadb systemctl enable mariadb.service mysql_secure_installation systemctl start mariadb.service