There seems to be no functioning support for ports or sockets in terms of database connection.
As I found out with one of my sites you can append the port to the host-information like follows:
Creating the tables now functions, but the port seems to be ignored as soon as you want to call the piwik-backend after installation, resulting in an error-message (couldn't connect to database). Therefore I played a little bit more and found that inserting "port=3307" in the config file fixes that problem too. This time though it wouldn't record any visits at all, and that's where I'm stuck at the moment. Seems the database connectivity isn't very continuous at the moment throughout the classes.
With another site I have a similar problem; I can't tell piwik the right mysql-socket to use. Keywords: database host port socket connection
It would be great if you had a more in depth look at it and provide a patch :)
(In ) - fixes #5625 you can now install with a mysql port non 3306 by specifying your.host:4455