Backup MySQL users

后端 未结 8 2013
无人及你
无人及你 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:36

    The users and privileges are stored in the databased named 'mysql'. You can use mysqldump to backup the tables in the databased named 'mysql'.

    0 讨论(0)
  • 2021-01-31 09:41

    So far my experience with MySQL i didn't see anything to backup user and their privileges through a command line.

    But i can backup those critical data by backing up mysql

    mysqldump -u root -p mysql > mysql.sql
    
    0 讨论(0)
提交回复
热议问题