5

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
  • 8,754
  • 28
  • 105
  • 167

4 Answers4

6

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

1

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.

TallTed
  • 9,069
  • 2
  • 22
  • 37
1

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....

1

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

Devart
  • 119,203
  • 23
  • 166
  • 186
  • sir, 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. – sqlchild Jun 02 '11 at 07:22
  • 1
    When 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. – Devart Jun 02 '11 at 08:20
  • In 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? – sqlchild Jun 02 '11 at 17:23
  • 1
    To 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 to `mysql`.`user`, ask administrator about accounts. Also, try to connect through the mysql client tool (http://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. – Devart Jun 03 '11 at 07:05
  • Hi 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. – James Jul 18 '13 at 12:39