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


Most viewed posts


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

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.