How to Determine What Is Causing a Problem

I'm utilizing phpMyAdmin to deal with my information bases, I have 2 tasks that utilization 2 diverse data set the first uses 'root'@'localhost' and the second is 'root'@'127.0.0.1' I don't have the foggiest idea how I wound up utilizing 2 distinctive worker however it was working fine until I attempted to alter codes with the first undertaking that utilizes 'root'@'localhost', I was attempting to choose from a table to be stacked to a DataGridView when a blunder sprung up saying "Host 'hostname' isn't permitted to interface with this MySQL worker". The second venture is working fine. This lone occurred after I attempt to make a module for interfacing with mysql information base since the previous code for associating with mysql is written in each structure.