I want to disable mysqldump command for all user's including root. As I am taking DB snapshot.
After removing mysqldump binary file from /usr/bin/ location. But is it safe to do so?
This command will prevent anyone, including root, from executing mysqldump:
sudo chmod -x /usr/bin/mysqldump
This command will make mysqldump executable again for anyone:
sudo chmod +x /usr/bin/mysqldump
You could alternatively remove /usr/bin/mysqldump, but it could easily be replaced without your knowledge during a software update. Or if you end up needing it again, you'd have to reinstall it.