Useful Snippets

Welcome!


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at Unwanted.cloud

RSS Latest posts from my personal blog


Subscribe to RSS feed


Minimal privileges required for a MySQL backup user

Stanislav KhromovStanislav Khromov

It’s good security practice to have a separate “backup” user that only has global read privileges.

The minimum privileges required to accomplish this are:

After setting up your new user, you can run:

mysqldump --all-databases -u backup -p > sqldump.sql

..to backup all your databases to the file sqldump.sql!

Check out my CentOS tutorial for information on how to set automatic database backup via CRON. (Step 15 in the guide.)

Full-stack impostor syndrome sufferer & Software Engineer at Schibsted Media Group

Comments 0
There are currently no comments.