CentOS6.5 MySQL5.6-yum localinstall安装命令 - ZKUI

Nothing is impossible

CentOS6.5 MySQL5.6-yum localinstall安装命令

下载:mysql57-community-release-el5-7.noarch.rpm
查看已安装mysql相关包
# yum list installed | grep mysql        
mysql-libs.x86_64 5.1.71-1.el6    @anaconda-CentOS-201311272149.x86_64/6.5
存在mysql-lib.x86_64  5.1版本,删掉,待会要安装Mysql5.6
# yum remove mysql-libs.x86_64
 yum本地安装rpm包
# yum localinstall mysql57-community-release-el7-9.noarch.rpm
查看yum中mysql包
# yum repolist all | grep mysql
禁用mysql57,启用mysql56
# yum-config-manager --disable mysql57-community
# yum-config-manager --enable mysql56-community
查看yum中启用的mysql包是否已经为mysql56-community
# yum repolist enabled | grep mysql
使用yum安装mysql-community-server
# yum install mysql-community-server
启动mysql服务
# service mysqld start
连接mysql,默认root密码为空,直接enter
# mysql -u root -p
添加远程用户
# GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
分享