Skip to content

[FEATURE REQUEST] Documentation / List required SQL Privileges #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
W1zzardTPU opened this issue Feb 3, 2025 · 0 comments
Open

Comments

@W1zzardTPU
Copy link

It would be useful to have a section in the documentation that lists the privileges required for a MyDumper user in the database (and why)

Answer from ChatGPT, not sure if accurate

To create a backup user in MySQL for mydumper, you need to grant the necessary privileges to allow the user to perform backups efficiently. Here’s the SQL script to create a backup user:

CREATE USER 'backup_user'@'localhost' IDENTIFIED BY 'StrongPassword';

GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT, SHOW VIEW, EVENT, TRIGGER, SELECT ON .
TO 'backup_user'@'localhost';

FLUSH PRIVILEGES;

Explanation of Privileges:

SELECT ON *.*: Allows reading all databases and tables.
RELOAD: Required for FLUSH operations (used in mydumper).
LOCK TABLES: Needed to use FLUSH TABLES WITH READ LOCK for consistent backups.
PROCESS: Grants access to process list (SHOW PROCESSLIST).
REPLICATION CLIENT: Required for reading binary log positions.
SHOW VIEW: Allows viewing database views.
EVENT: Grants access to backup database events.
TRIGGER: Allows backing up triggers.
@davidducos davidducos transferred this issue from mydumper/mydumper Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant