MySQL: Use a positive port number to test connection failures

Port 1023 is reserved and not likely to be used on most systems.