码迷,mamicode.com
首页 > 数据库 > 详细

1.RPM包安装mysql5.7

时间:2017-02-27 12:58:20      阅读:428      评论:0      收藏:0      [点我收藏+]

标签:apple   nodeps   cli   bit   start   提示   update   key   art   

  1. ?官方下载地址:

    wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar

  2. 解压:

    tar xvf mysql-5.7.17-1.el6.x86_64.rpm-bundle.tar

  3. 卸载之前的版本

    rpm -qa | grep -i mysql

    rpm -e --nodeps 要卸载的mysql版本

  4. 按照步骤来安装就好

    1.rpm -ivh mysql-community-libs-5.7.17-1.el6.x86_64.rpm --nosignature

    2.rpm -ivh mysql-community-devel-5.7.17-1.el6.x86_64.rpm  --nosignature

    3.rpm -ivh mysql-community-client-5.7.17-1.el6.x86_64.rpm  --nosignature

    4.rpm -ivh mysql-community-server-5.7.17-1.el6.x86_64.rpm  --nosignature

  5. 修改密码 (有点特殊 )

        1.找到my.cnf |  本机  /etc/my.cnf

        2.[mysqld]#下添加

          skip-grant-tables=1 #不用验证

        3.开启mysql /etc/init.d/mysqld start|本机默认地址

        4.进入并修改(依次命令)

    ?        1. mysql -uroot -p;

    ?        2.use mysql

    ?        3.update user set authentication_string = password(‘123456‘), password_expired = ‘N‘, password_last_changed = now() where user = ‘root‘;

    ?     ?5.my.cnf |  本机  /etc/my.cnf 里面删除skip-grant-tables=1 

    ?6.测试

    ?    mysql -uroot -p123456 -e "show databases;";

    ?7.OK收工;

 

 


 

 

 

遇到的错误总结:

1.默认提示需要输入校验码

[root@xxxxxx tool]# rpm -ivh mysql-community-devel-5.7.17-1.el6.x86_64.rpm 

warning: mysql-community-devel-5.7.17-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

解决:(去掉校验安装)

rpm -ivh mysql-community-devel-5.7.17-1.el6.x86_64.rpm --nosignature  

 

 

2.木有安装 mysql-community-libs-5.7.17-1.el6.x86_64.rpm

[root@xxxxxx tool]# rpm -ivh mysql-community-devel-5.7.17-1.el6.x86_64.rpm  --nosignature

error: Failed dependencies:

libmysqlclient.so.20()(64bit) is needed by mysql-community-devel-5.7.17-1.el6.x86_64

mysql-community-libs(x86-64) >= 5.7.9 is needed by mysql-community-devel-5.7.17-1.el6.x86_64

解决:

rpm -ivh mysql-community-libs-5.7.17-1.el6.x86_64.rpm  --nosignature

 

1.RPM包安装mysql5.7

标签:apple   nodeps   cli   bit   start   提示   update   key   art   

原文地址:http://www.cnblogs.com/subtract/p/6473207.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!