Host...not allowed error in ODBC connection, while connecting to an online MySQL database
Solution 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
Solution 2
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....
Solution 3
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
Solution 4
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.
sqlchild
Making me.....will appear soon :) Work : PHP and MySQL are in my two hands, shaking my hands together, thus, INNER JOINING the two entities to output some good web applications Need to Say me Hi!....just post a comment on any of my SO post....I will be right there :)
Updated on February 06, 2020Comments
-
sqlchild about 4 years
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.
-
sqlchild almost 13 yearssir, in the User and Password fields, which one of the user and password i have to enter, the cpanel credentials(www.myweb.com/cpanel), or the credentials of the database to which to connect to.
-
Devart almost 13 yearsWhen you connect to MySQL you should specify host, port, user, password (it is minimal required; some of these may be default). User account has a user and a host name, e.g. 'user1'@'hostname', or 'user2'@'%'; in this case 'user1'@'hostname' can connect only from 'hostname', but 'user2'@'%' can connect from any host. Check that your host is allowed to connect to server.
-
sqlchild almost 13 yearsIn other case, i enter www.myweb.com in TCP/IP Server , in userid and password i enter the ones which i enter for www.myweb.com/cpanel , then it says access denied?
-
Devart almost 13 yearsTo get a list of all users, run 'SELECT * FROM mysql.user;'. What is you real host name? There should be an user in the table
mysql
.user
with specified name and host. If you do not have access tomysql
.user
, ask administrator about accounts. Also, try to connect through the mysql client tool (dev.mysql.com/doc/refman/5.5/en/mysql.html), e.g. >mysql --host=your_host --port=your_port --user=user_name --password=your_password. -
James almost 11 yearsHi Devart, I am having a similar issue but instead of the error giving an incorrect IP address as the host, it is giving me a text name of '[xxxx-pbb.pbb.demon.com'] with 'demon' being our ISP provider. Now in the mysql users we already have a user set up with a host that is equal to same IP address that the our Demon line resolves to, however do I need to duplicate that user and replace the IP address with the text above? Thanks in advance.
-
cBlaine about 10 yearsBased on the OQ, this is likely the best answer. Thanks!