Vasanthan Gunaratnam wrote:
>
> I have the following setup:
>
> - mysql server and client on same host
> - client program connects to server, performs queries, then quits
>
> Facts:
>
> 1. I have been using this system for ~3 months with no problems
>
> 2. I recently moved both server and client to new host and observed the
> following:
> - client connects succesfully on first run/attempt
> - subsequent connects (i.e. mysql_real_connect) fail the *majority*
> of the time
> - shutdown of server and re-start enables the client to connect
> again, but only on the first
> attempt
>
> 3. mysqladmin shows that the threads associated with a client's
> connection are terminated when
> the client dies and attempts to re-connect
>
> 4. the mysql utility can connect to server when client program cannot
>
> 5. client (obviously) has permissions to connect (since it does so on
> the first attempt).
>
> 6. the error number returned by mysql_real_connect() is 2003 and the
> error message generate is:
> " Can't connect to MySQL server on 'localhost' (126)"
>
> 7. system seems to work ok when it is move back to the original/old host
>
> I would appreciate any help in resolving this problem.
> Thanks in advance.
>
> Vasanthan Gunaratnam, vasg@stripped
>
Can you post the source of your client - at least enough code to see the
logic used for connecting to MySQL?
--
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)