Its quite simple if you understand how Userid's work in MySQL.
Each userid has a location associated with it from where that userid is allowed to logon from. This can be from anywhere %
but normally its an ip address or set of ip addresses.
So the userid you are using is probably setup to be allowed access from localhost
and 127.0.0.1
and maybe ::1
all of which are ways of addressing the PC that the MySQL Server is running on.
These should suffice so use localhost
or 127.0.0.1
or change the userid definition in MySQL to be allowed to acess from 192.168.0.99
or whatever you ip address is, but using one of the alias's for this PC
should be all you need.
Using the alias's
also helps when you move your code to another machine and/or MySQL server. I fyou use a specific IP it probably wont.