User for MariaDB monitoring
To monitor a MariaDB instance, it is necessary to create a monitoring user with restricted permissions:
First we connect to the instance:
mysql -h host -u [email protected] -p
We hash the new user password:
SELECT PASSWORD('userpassword');
OUTPUT :
+-------------------------------------------+
| PASSWORD('userpassword') |
+-------------------------------------------+
| *54958E764CE10E50764C2EECBB71D01F08549980 |
+-------------------------------------------+
1 row in set (0.00 sec)
We create the user:
CREATE USER [email protected] IDENTIFIED BY PASSWORD '*54958E764CE10E50764C2EECBB71D01F08549980';
Add read permissions to the user:
GRANT SELECT ON testdb.* TO [email protected];
Flush the permissions:
FLUSH PRIVILEGES;