Mysql: Potential workaround for race-condition in create().

It seems mysql_real_connect() and/or mysql_close() aren't
fully thread-safe. When there's a high reconnect contention,
create() sometimes failed with ECONNREFUSED. A network scan
of the client could observe that a new connection was closed
by the client before the server had sent its greeting.

The bug has been observed as recently as in MySQL 5.5.30.