Backup MySQL users

后端 未结 8 2014
无人及你
无人及你 2021-01-31 09:15

How do I backup MySQL users and their privileges?

Anything like mysqldump?

I am looking for something like:

mysqldump -d -u root -p MyTable &         


        
8条回答
  •  执笔经年
    2021-01-31 09:34

    Percona has a great tool for this. pt-show-grants will dump users and their permissions so you can easily reload them.

    https://www.percona.com/doc/percona-toolkit/LATEST/pt-show-grants.html

提交回复
热议问题