Host…not allowed error in ODBC connection, while connecting to an online MySQL database

痞子三分冷 提交于 2019-12-14 03:45:57

问题


I have downloaded MySQL ODBC Connector 5.1. Now am trying to setup the DSN. But am getting the error:

Connection Failed : [HY000] [MySQL] [ODBC 5.1 Driver]Host '117.x.x.x' is not allowed to connect to this MySQL server

My server url is server.myweb.com - this name am entering in the TCP/IP Server and Port =3306.

I have also entered the userid and password , which is the one which i enter when i open www.myweb.com/cpanel

Is this a version problem? Should the version of MySQL on my server also be 5.1, i.e. the one of the ODBC?

Please help.


回答1:


Run MySQL Workbench and Login

Go to Users and Privilegies

Select the User and Change Limit Connectivity to Hosts Matching with %

And Save the changes




回答2:


It is not a version or ODBC problem. This error says there is no user with specified host name. Read more information in MySQL reference - http://dev.mysql.com/doc/refman/5.1/en/grant.html#grant-accounts-passwords




回答3:


As others have said, this issue is not about the version of any component.

When clients (ODBC or otherwise) try to connect to MySQL, the server checks the username and password and the originating host identity against its permissions tables. This KB article may help you resolve the issue.




回答4:


in cpanel under database there is an option "remote MySQL" select the option. It will redirect to "Remote database Access Host" add your IP '117.x.x.x' . After adding you ip to remote MySQL the cpanel check the connection....

Note- if your ip is dynamic remove the old ip and add the new ip to Remote MySQL in you cpanel....



来源:https://stackoverflow.com/questions/6211501/host-not-allowed-error-in-odbc-connection-while-connecting-to-an-online-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!