Can you post a full, minimal, reproducible example of the issue? And can you clarify exactly why the issue is? "It hangs" is not terrible descriptive. Is there an entry in the error log? Have you confirmed that your MySQL server is accessible via the host/port/name/password you provide?