下载wget包管理工具
yum
-y install wget
下载mysql的rpm包
wget http:
//repo
.mysql
.com
/mysql
-community
-release
-el7
-5
.noarch
.rpm
解压rpm包
rpm
-ivh mysql
-community
-release
-el7
-5
.noarch
.rpm
安装mysql服务
yum
-y install mysql
-server
启动mysql,开机自启:
systemctl
start mysqld
systemctl enable mysqld
登录mysql:
mysql
修改密码:
set password
for root@localhost = password
('root');
开放远程连接:
grant all privileges on
*.* to
'root'@
'%' identified by
'root' with grant option
;
flush privileges
;