Question: how to create user for specific database in mysql?
Answer: Connect to your MySQL database: $ mysql.
Create a database for Matomo: $ mysql> CREATE DATABASE matomo_db_name_here;
Create a user called matomo , if you are using MySQL 5.7 or MySQL 8 or newer: $ mysql> CREATE USER 'matomo'@'localhost' IDENTIFIED WITH mysql_native_password BY 'my-strong-password-here';