There is multiple things you have to take into consideration while accessing mysql from another machine some them are -
Assuming you did write correct code
1.Change mysql config (my.ini) to receive packets from all IP
2.Add firewall Exception for port 3306 on machine where Mysql is Hosted
3.User name password is Correct and granted proper privileges.
PS:-Do not share server credentials on public forums
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…