MySQL 8.0 Migrating Roles from one server to Another



  • Hi there in my company we are starting to implement MySQL 8.0 (because we are using AWS Serverless 2) and one of the "new features" that MySQL 8.0 that has is the "User Roles".

    My question is when we do a certain amount of Roles that we assing to specific users when we want to "move" those users from a database to another with mysqldump those roles will be migrated to or how can we do this?

    This starts because when we do in the other MySQL versions the mysqldump we never could migrate the users and passwords from one database to another.

    I hope all of you could understand my situation and thanks!



  • mysqldump dumps users and roles as INSERT statements to populate data in the system tables in the mysql schema. So to dump these, you would use:

    mysqldump mysql
    

    The new tool https://dev.mysql.com/doc/refman/8.0/en/mysqlpump.html has an option for dumping users and roles as CREATE USER and GRANT statements instead:

    mysqlpump --exclude-databases=% --users
    

Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2