ITPub博客

首页 > 数据库 > MySQL > CentOS 6.6使用rpm包安装MySQL 5.6

CentOS 6.6使用rpm包安装MySQL 5.6

原创 MySQL 作者:zyp4IT 时间:2015-04-05 16:07:31 0 删除 编辑

CentOS 6.6下载地址

http://mirrors.aliyun.com/centos/6.6/isos/x86_64/  (minimal版)

MySQL 5.6下载地址

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.23-1.rhel5.x86_64.rpm

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.23-1.rhel5.x86_64.rpm


使用wget 直接在CentOS上下载MySQL(server、client)

若提示wget:command not found,则需先安装wget。

yum install wget -y


 wget安装好后,接下来即可继续MySQL下载

wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.23-1.rhel5.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.23-1.rhel5.x86_64.rpm


安装时若提Failed depaendencies:/usr/bin/perl is needed by MySQL-.......,则需安装perl

yum install perl -y


安装:

rpm -ivh  MySQL-server-5.6.23-1.rhel5.x86_64.rpm

rpm -ivh  MySQL-server-5.6.23-1.rhel5.x86_64.rpm


conflicts with file from package mysql-libs-5.1.....
包冲突,需将老版本的包卸载(删除)。

 rpm -e  mysql-libs   --nodeps


继续安装。。。

安装完毕,启动数据库

service mysql start


查看初始密码
cat /root/.mysql_secret

设置密码

mysql -uroot -p

 粘贴查看到的初始密码
set password for 'root'@'localhost'=password('newpass');


test->show databases;


关闭mysql数据库

service mysql stop


卸载mysql数据库

rpm -e MySQL-server

rpm -e MySQL-client



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30164674/viewspace-1499689/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-03-16

  • 博文量
    38
  • 访问量
    122462