0

I have a database on my server and I want to connect to it through MySql Workbench, I entered my HostName, Username, Password, When I click Test Connection I get this Error Message:

    Failed to Connect to MYSQL at **.**.***.**:3306 with user root.
Host '**.171.199.66' is not allowed to connect to this MySQL server

I am 100% sure my Hostname, username and Password are correct, I did some research and from what I managed to find out that I have to actually permit an access from my IP address to the database before I can connect.....if this is correct could someone explain to me how to give myself e permission to connect to my database on server.

user3669523
  • 69
  • 2
  • 3
  • 11
  • This page in the docs might be helpful: http://dev.mysql.com/doc/refman/4.1/en/account-names.html – dg99 Jun 04 '14 at 16:23

1 Answers1

1

It is likely that your MySql root account is configured to not accept remote root logins (its a default). If you are trying to connect from anywhere but localhost its not going to allow it. Your're right you need to permit access for your IP. You need to do it from within the server your MySql is installed on. In case of if you have managed hosting, your hosting company should provide you with a tool like phpMyAdmin or such, to manage your MySql. If it is your own installation, you can connect to mysql server instance from the console and go from there.

Check out another stackoverflow post:

Here is what you should be looking for in phpMyAdmin:

Users View phpMyAdmin

Keep in mind it might look a bit different depending on the phpMyAdmin Version.

Community
  • 1
  • 1
MikeWu
  • 3,042
  • 2
  • 19
  • 27
  • Well I am on VPS and installed everything my self cpanel, WHM etc, so I do have a phpMyAdmin, Now is it something I have to config through SQL commands or via options available on phpMyAdmin – user3669523 Jun 04 '14 at 16:32
  • phpAdmin has option to configure that. In your phpAdmin you need to find your users panel. There, in the root field you need to add Ip address to the root account. Ill try to get you some images. – MikeWu Jun 04 '14 at 16:33
  • just follow your suggestions but I do not have a privileges tab in my phpMyAdmin home page.. – user3669523 Jun 04 '14 at 17:03
  • Users tab maybe ? What version of phpMyAdmin is it ? – MikeWu Jun 04 '14 at 17:03
  • But In cpanel I have database Section I have a Remote Mysql And I just added my IP address onto the list and now I can connect to my database through workBench fantastic. Appreciate your help :) – user3669523 Jun 04 '14 at 17:06