salt.states.mysql_user

Management of MySQL users.

NOTE: This module requires the MySQLdb python module and the proper settings in the minion config file. See salt.modules.mysql for more information.

The mysql_user module is used to manage MySQL users.

frank:
  mysql_user.present:
    - host: localhost
    - password: bobcat
salt.states.mysql_user.absent(name, host='localhost')

Ensure that the named user is absent

name
The name of the user to remove
salt.states.mysql_user.present(name, host='localhost', password=None, password_hash=None)

Ensure that the named user is present with the specified properties

name
The name of the user to manage
password
The password
password_hash

The password in hashed form. Be sure to quote the password because YAML doesn't like the *:

SELECT PASSWORD('mypass') ==> *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4

Table Of Contents

Previous topic

salt.states.mysql_grants

Next topic

salt.states.network