Have you tried this code using: hostaddr.sin_port :=htons(3306);
I've never done this but the code looks like it is checking the appropriate port on all machines found. See what happens when you use the MySQL default port. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]