《MysqL教程完美解决MysqL客户端授权后连接失败的问题》要点:
本文介绍了MysqL教程完美解决MysqL客户端授权后连接失败的问题,希望对您有用。如果有疑问,可以联系我们。
MysqL学习在本地(192.168.1.152)部署好MysqL环境,授权远程客户机192.168.1.%连接本机的MysqL,在iptables防火墙也已开通3306端口.
MysqL学习如下:
MysqL学习MysqL> select host,user,password from MysqL.user;
+--------------+-----------------+---------------------------------------------------------+
| host | user | password |
+--------------+-----------------+----------------------------------------------------------+
| localhost | root | |
| fdm1 | root | |
| 127.0.0.1 | root | |
| localhost | | |
| fdm1 | | |
| 192.168.1.% | db_hqsb | *dfc9DC16B13651A95ECEC3A26E07D244431B55C9 |
| 192.168.1.% | db_ro_hqsb | *2C0B0DD50595BB40879110437BEEF026D019DFB7 |
| 192.168.1.% | db_jkhwuser | *2C0B0DD50595BB40879110437BEEF026D019DFB7 |
| 192.168.1.25| slave | *EE52B8EACB3CCD13624273AD6B5cda52B9B53EB7 |
| 192.168.1.% | tech_db_user | *6053E57C7B61043DC2C6B4E3291D5F61CCC23F5C |
| 192.168.1.% | game_db_user| *05EA4D71C9A1273ECF3E24E6323F7175AE45C366 |
| localhost | zabbix | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+---------------+---------------+------------------------------------------------------------+
MysqL学习问题:
MysqL学习在客户机(比如192.168.1.20)上远程连接上面192.168.1.152机器的MysqL,连接失败!
MysqL学习[root@huanqiu ~]# MysqL -udb_ro_hqsb -h 192.168.1.152 -pmhxzkhl0802xqsjdbERROR 1130 (HY000): Host '192.168.1.20' is not allowed to connect to this MysqL server
MysqL学习解决:
MysqL学习是由于192.168.1.152的MysqL里“host为localhost,user和password为空”这条语句导致的,删除这条即可解决问题!
MysqL学习MysqL> delete from MysqL.user where host="localhost" and user="";
query OK,1 row affected (0.00 sec)
MysqL> flush privileges;
query OK,0 rows affected (0.00 sec)
MysqL学习这样,授权连接的客户机就能成功连接了!
MysqL学习[root@huanqiu ~]# MysqL -uxqsj_db_ro_user -h 192.168.1.152 -pmhxzkhl0802xqsjdbWelcome to the MysqL monitor. Commands end with ; or \g.Your MysqL connection ID is 28Server version: 5.1.73 Source distributioncopyright (c) 2000,2013,Oracle and/or its affiliates. All rights reserved.Oracle is a registered Trademark of Oracle Corporation and/or itsaffiliates. Other names may be Trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MysqL>
MysqL学习以上这篇完美解决MysqL客户端授权后连接失败的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持内存溢出PHP.
总结以上是内存溢出为你收集整理的MYSQL教程完美解决mysql客户端授权后连接失败的问题全部内容,希望文章能够帮你解决MYSQL教程完美解决mysql客户端授权后连接失败的问题所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)