Why can't I connect with MySQL native driver

I’ve been using the JDBC driver to connect to MySQL for years on localhost and through LAN/WAN. Decided to try the Native driver 1.0.2 for Windows with the same connection details to speed things up but it fails with “Can’t connect to MySQL server on ‘localhost’ (10061)”, SQL Status: HY000, Error code: 2003.

Any pointers for troubleshooting this, please?

Win7 64bit, LO4.2.6.2, MySQL5.1

Got it. It seems the driver does not resolve host names. Changing localhost to 127.0.0.1 does the trick.