Puppet has official support to managing users and grants through a community maintained module. Click here for documentation. There's more modules to manage different aspects of Mysql, you can definitely do a lot more as code using Puppet. Make sure to read the documentation to know all the features, know every input option and all the use cases supported.

Create a user with SELECT and UPDATE permissions

mysql::db { 'mydb': user => 'myuser', password => 'mypass', host => 'localhost', grant => ['SELECT', 'UPDATE'], }

Create a user with a pre hashed password and the same SELECT and UPDATE permissions

mysql::db { 'mydb': user => 'myuser', password => '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4', host => 'localhost', grant => ['SELECT', 'UPDATE'], }

Why Puppet for managing Mysql users/grants

There are many reasons why Puppet has become the most popular Configuration Management tool. Some of the key benefits that Puppet provides include:

-Centralized management: With Puppet, all your servers can be managed from a single point, making it easier to keep track of all your systems and ensuring consistency across them.

-Automation: Puppet can automate the configuration of your servers, saving you time and reducing the risk of human error.

-Ease of use: Puppet is easy to learn and use, even for novice administrators.

-Flexibility: Puppet is highly flexible and can be adapted to meet the specific needs of your organization.

-Scalability: Puppet is scalable, meaning it can handle large and complex deployments.

If you're looking for a powerful, reliable and user-friendly Configuration Management tool, Puppet is the ideal choice. Contact us today to find out more about Puppet and how it can benefit your organization.