Step1 将rpm包下载到本地
需要下载两个包:用于提供服务的server和用于客户端展示的client.
cd /user/tools
wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.21-1.rhel5.x86_64.rpm
wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.21-1.rhel5.x86_64.rpm
Step2 安装rpm包
rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm
rpm -ivh MySQL-client-5.6.21-1.rhel5.x86_64.rpm
Step3 启动mysql
systemctl start mysql
Step4 登录mysql
查看mysql初始密码
cd
cat .mysql_secret
登录mysql,执行命令后输入.mysql_secret中的密码
mysql -uroot -p
Step5 修改Mysql密码
SET PASSWORD = PASSWORD('geekzhou.com');