Headshot

Jon Atkinson

I'm a technologist, with a long and varied history in high-end technical delivery and infrastructure management. I'm particularly interested in managing software teams, rapid application development, and scalability challenges.

Creating a read only backup user with MySQL

6th January 2009

I always have to look up which permissions a user needs to just run mysqldump successfully. This creates a new backup user, without a password, and gives them the least amount of privilege necessary.

CREATE USER 'backup'@ 'localhost';
GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD ON *.* to backup@localhost;
FLUSH PRIVILEGES;