Hi all,
I am using MySQL as my application database in a local network applications. And in connection string I used IP address instead of computer-name. And the last three years everything worked very well without any errors but recently we changed our sever as a DHCP sever. From that point I am getting many connection errors as MySQL host not responding, connection failed etc. I just want to know can I have any benefits if I use computer name/server name in application connections string instead of IP Address?. As I am a newbie please help me to distinguish between using IP address and computer name in connection strings.
What I have tried:
I tried debugging the connection errors. And it seems that same IP address is sometimes used by two computers causing the issues. I am not able to make any change in applications unless until i have an expert advice regarding.
-Thanks in advance
解决方案Quote:same IP address is sometimes used by two computersThat means that you did not set up your network properly. Likely, there are still some computers still using fixed IP addresses instead of IP addresses from the DHCP server. So your problems are not a MySQL problem but a network configuration problem.
Normally a DHCP server can be told which addresses it can assign automatically, and which addresses are reserved. Look thru all computers and other devices (e.g. printers) in your network, make sure they get their addresses from the DHCP server, or their fixed IP address falls into the reserved range (and is unique).