How do I specify to use Mysql on a custom port or to connect Mysql over a socket?
During the Matomo (Piwik) installation at the Database setup step, the host can be specified as:
- hostname
- IP address
You can specify a custom port number to connect Mysql (instead of default port 3306
):
hostname:port
ipaddress:port
You can also specify to connect through a socket:
/sock/path
– anything before the slash is ignoredlocalhost
– localhost has a special meaning in php 5.3+; with mysqlnd, it means use the default sock path
If you have already installed Matomo you can configure the port or socket in the config.ini.php
file below your [database]
section:
port = 3500
unix_socket = /path/to/sock # if specified, it will override any specified hostname and/or port