MySQL安装方式有两种,一种是yum/rpm安装,另外一种是tar源码安装
1、yum安装
centos6:yum -y install mysql-server mysql-devel mysql
centos7:yum -y install mariadb mariadb-devel mariadb-server
#安装完成之后可以查询一下软件是否安装成功:
#rpm -qa |grep mariadb
Mariadb和mysql数据库软件命令和配置都是类似的
启动数据库并查看其状态:
systemctl start mariadb
systemctl status mariadb