8

When I try to connect with putty I get 'host is not allowed to connect to this mysql server'. Why is that happening? Host and client are on my machine.

When I connect with the command line it connects.

Robert H
  • 11,520
  • 18
  • 68
  • 110
kul_mi
  • 1,131
  • 5
  • 15
  • 33

1 Answers1

37

You need to change how your configuration is set up.

Comment out the skip-networking section within your MySQL config: # skip-networking, if you have skip-networking it will discard any TCP/IP connection which is likely why your failing.

Once you have enabled your TCP/IP connections you will need to grant permission to your user to connect from other machines:

GRANT ALL PRIVILEGES ON *.* TO <username>@'%' IDENTIFIED BY '<password>';

This will let username connect from any machine to your database with the appropriate password.

Myron Marston
  • 21,452
  • 5
  • 64
  • 63
Robert H
  • 11,520
  • 18
  • 68
  • 110