Useful Snippets

Useful Snippets


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

August 2020
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Categories


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.)

Web Developer at Aftonbladet (Schibsted Media Group)
Any opinions on this blog are my own and do not reflect the views of my employer.
LinkedIn
Twitter
WordPress.org Profile
Visit my other blog

Comments 0
There are currently no comments.