CentOS 7比6变化了不少的东西……

正确安装启动方式:

yum install mariadb-server mysql -y
systemctl stop mariadb.service
systemctl start mariadb.service
systemctl enable mariadb.service

设置默认root密码:

mysql_secure_installation

Related Posts: 解决CentOS7 无法启动MySQL的解决办法 :