When I was connecting to the database I always used "localhost" as a host name.
Now I want to connect to my MYSQL database from Windows program and I have to use the real IP instead of localhost.
I tried to use the server IP and IP from this:
SHOW VARIABLES WHERE Variable_name = 'hostname'
Check the user table in MySQL.
select user, host from mysql.user;
Check either they have privileges to connect remotely or not.
bind-address in configuration file, it has to be commented.