MariaDB – Create user

Create user have permissions on all tables

GRANT ALL PRIVILEGES ON *.* TO 'user1'@localhost IDENTIFIED BY 'password1';

Create user have permissions on specific table

GRANT ALL PRIVILEGES ON 'yourDB'.* TO 'user1'@localhost;
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'user1'@localhost;

Drop user

DROP USER 'user1'@localhost;

Create user for exporter

CREATE USER 'exporter'@'192.168.1.%' IDENTIFIED BY 'password' WITH MAX_USER_CONNECTIONS 3;

GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO 'exporter'@'localhost';

https://phoenixnap.com/kb/how-to-create-mariadb-user-grant-privileges