欢迎访问我的个人博客网站: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 |