Backup user for MySQL / MariaDB
Since I don't like the fact to use a superuser for that, I wanted to create a user for MySQL / MariaDB, that will be able just to read all databases and to back them up using AutoMySQLBackup or my own PowerShell script.
It works when the user has the following global privileges:
- SELECT
- SHOW DATABASES
- LOCK TABLES
- EXECUTE
- SHOW VIEW
- EVENT
- TRIGGER
You can assign these privileges using the following SQL statement (assuming your user is called backup):
GRANT SELECT, SHOW DATABASES, LOCK TABLES, EXECUTE, SHOW VIEW, EVENT, TRIGGER ON *.* TO `backup`@`localhost`;
Published on 2022-11-06, 11:08 +0000