一,我们是在VMware虚拟机上安装的mysql,使用的是CentOS7,具体可以查看Windows安装Linux虚拟机(CentOS7)
二 、 安装 yum install mysql-server mysql-devel mysql
三、wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm (安装mysql服务端需要的资源)
四、安装rpm 包 rpm -ivh mysql-community-release-el7-5.noarch.rpm
五、检查是否安装成功,如下图安装成功:ls -1 /etc/yum.repos.d/mysql-community*
六、安装mysqlserver :yum install mysql-server
七、启动mysql 服务:systemctl start mysqld ,关闭:systemctl stop mysqld ,从启mysql命令 :systemctl restart mysql