2,安装 mysql yum源
wget http://repo.mysql.com/mysql-community-release-el7.rpm
rpm -Uvh mysql-community-release-el7.rpm
3,安装
yum install -y mysql-server
4,配置
#开机启动
systemctl enable mysqld.service
#初始化用户密码
mysql_secure_installation
#修改配置文件,去掉sql-mode 中的STRICT_TRANS_TABLES(严谨模式)
原文地址:http://blog.51cto.com/8047993/2114102