1

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!

1 Answer 1

0

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 mysqlpump has an option for dumping users and roles as CREATE USER and GRANT statements instead:

mysqlpump --exclude-databases=% --users
1
  • Thanks i will try to read that documentation and try to put in use thank you for your reply. Commented May 19, 2022 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.