Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 991
sqlchild Avatar asked Jun 02 '11 07:06

sqlchild


People also ask

How do I fix MySQL host is not allowed to connect to this server?

To fix this, add a user that allows your host. To allow any host, use the wildcard symbol %. You can add a user from the command line or with a UI client (such as MySQL Workbench or phpMyAdmin).

Can't connect to MySQL server on host?

Here are some reasons the Can't connect to local MySQL server error might occur: mysqld is not running on the local host. Check your operating system's process list to ensure the mysqld process is present. You're running a MySQL server on Windows with many TCP/IP connections to it.


2 Answers

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

like image 33
Devart Avatar answered Oct 31 '22 15:10

Devart


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

like image 168
Mauricio Palacios Avatar answered Oct 31 '22 14:10

Mauricio Palacios