Database connection

I have a suse linux server with several mysql instances. In order to connect to a mysql instance on the shell I have to use for instance the following command:

mysql -u piwik -p -P 3307 -h 127.0.0.1 --socket=/tmp/mysql.sock2

Piwik is installed on the same server. Does anyone know how to configure this mysql instance in the config.ini.php? When I enter

[database]
host = "127.0.0.1"
username = "piwik"
password = "xxxxxxxxx"
dbname = "piwik"
port = "3307"
tables_prefix = "piwik_"
charset = “utf8”

I get the following error at the piwik web-login:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘piwik.piwik_option’ doesn’t exist

However, the Table piwik.option exists in piwik database.

Thank you for your help!

Does this FAQ help ? Installation - Analytics Platform - Matomo

Not really, but maybe I misunderstand it; how would you insert the parameter from

mysql -u piwik -p -P 3307 -h 127.0.0.1 --socket=/tmp/mysql.sock2

in

[database]
host = "127.0.0.1"
username = "piwik"
password = "xxxxxxxxx"
dbname = "piwik"
port = "3307"
tables_prefix = "piwik_"
charset = “utf8”

Thank you again.

In “host” try to put “/tmp/mysql.sock2” ?

Unfortunately, not:

SQLSTATE[HY000] [2005] Unknown MySQL server host ‘/tmp/mysql.sock2’ (2)