-1

Currently I am using VS 2010 and MySQL Workbench, but when I run the code I see this error:

'Host 'localhost' is not allowed to connect to this MySQL server'.

I have installed MySQL Workbench in Windows Server 2012 r2, when I tried to login using IP address I am getting error like

Host xxx is not allowed to connect to this MYSQL server.

rlandster
  • 7,294
  • 14
  • 58
  • 96
Preethi
  • 1
  • 2
  • 1
    Possible duplicate of [Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server](http://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server) – Julien Lopez Nov 21 '16 at 12:02

1 Answers1

2

Thats a security issue i think.

Please recreate new user on the mysql database.

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;

CREATE USER 'username'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;

FLUSH PRIVILEGES;

After that, please restart MYSQL Services.

chrs04
  • 41
  • 7