mysql 5.6.35--libc.so.6(GLIBC_2.14)(64bit),libstdc++.so.6(GLIBCXX_3.4.15)(64bit)

欢迎访问我的个人博客网站:http://www.yanmin99.com/

centos 6.5 安装mysql 5.6.35–libc.so.6(GLIBC_2.14)(64bit),libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
  • 1、原因应该是centos6应该是el/6,centos应该是el/7的源

    Error: Package: mysql-community-server-5.6.30-2.el7.i686 (mysql56-community)
    Requires: systemd
    Error: Package: mysql-community-server-5.6.30-2.el7.i686 (mysql56-community)
    Requires: libstdc++.so.6(GLIBCXX_3.4.15)
    Error: Package: mysql-community-client-5.6.30-2.el7.i686 (mysql56-community)
    Requires: libc.so.6(GLIBC_2.17)
    Error: Package: mysql-community-server-5.6.30-2.el7.i686 (mysql56-community)
    Requires: libc.so.6(GLIBC_2.17)
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest  
  • 2、解决方案

    • A、删除yum remove "mysql56-community-release-el7.*"

      yum remove "mysql56-community-release-el7.*"
    • B、清楚缓存yum clean all

      yum clean all   
    • 修改mysql56-community中baseurl的值

      //修改之前
      
      # enable to use MySQL 5.6
      
      [mysql56-community]
      name=MySQL 5.6 Community Server
      baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/
      enabled=1
      gpgcheck=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
      //修改之后
      
      # enable to use MySQL 5.6
      
      [mysql56-community]
      name=MySQL 5.6 Community Server
      baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
      enabled=1
      gpgcheck=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
    • 解决ERROR 1130: Host ‘xxxx’ is not allowed to connect to this MySQL server方法

  • 分析原因
    • 应该是该账号不能远程登陆,所以要看一下,mysql库中的User表改用的访问权限设置。
  • 方案一:改表法

    • 1、登陆数据库

      mysql -u root -p
    • 查看mysql库中的user表

      mysql> use mysql;
      mysql> select host,user from user;
      +-----------------------------+------+
      | host                        | user |
      +-----------------------------+------+
      | localhost                   | root |
      | 127.0.0.1                   | root |
      | ::1                         | root |
      | node404v.add.bjsc.qihoo.net | root |
      +-----------------------------+------+

      查看发现root用户只有本机可以访问

    • 把User表中的host字段”localhost”改称”%”

      mysql> update user set host = '%' where user = 'root';
      mysql> select host,user from user;
      +-----------------------------+------+
      | host                        | user |
      +-----------------------------+------+
      | %                           | root |
      | 127.0.0.1                   | root |
      | ::1                         | root |
      | node404v.add.bjsc.qihoo.net | root |
      +-----------------------------+------+
  • 方案二:授权法

    • 1、如果你想myuser使用mypassword从任何主机连接到mysql服务器的话。

      GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; 

      这样有点不安全,所以建议指定ip才能访问。

    • 2、如果你想允许用户myuser从ip为192.168.1.18的主机连接到mysql服务器,并使用mypassword作为密码。

      GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.18' IDENTIFIED BY 
      'mypassword' WITH GRANT OPTION; 
    • 操作如下:

      GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.18' IDENTIFIED BY 
      'mypassword' WITH GRANT OPTION;
      Query OK, 0 rows affected (0.23 sec)
      
      mysql> select user,host from user ;
      +-----------------------------+------+
      | host                        | user |
      +-----------------------------+------+
      | 10.255.9.79                 | root |
      | 127.0.0.1                   | root |
      | localhost                   | root |
      | ::1                         | root |
      | node404v.add.bjsc.qihoo.net | root |
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值