Why does the MySQL command line tool ignore the --port parameter?

Solution 1:

When localhost parameter given, MySQL uses sockets. Use 127.0.0.1 instead.