Install the MySQL client and/or server.
See the full Salt Formulas installation and usage instructions.
Meta-state that includes all server packages in the correct order.
This meta-state does not include
below for details.
Install the MySQL client package.
Install the MySQL server package and start the service.
Debian OS family supports setting MySQL root password during install via debconf.
If no root password is provided in the pillar, a random one will
be created. Because Hydrogen doesn't have easy access to a random
function (test.rand_str isn't introduced until Helium), instead,
we use the not-at-all random
grains.server_id. As this is
cryptographically insecure, future formula versions should use the
Ensure that the MySQL service is not running.
Create and manage MySQL databases.
Install mysql python bindings.
Create and manage MySQL database users with definable GRANT privileges.
The state accepts MySQL hashed passwords or clear text. Hashed password have priority.
See the salt.states.mysql_user docs for additional information on configuring hashed passwords.
Make sure to quote the passwords in the pillar so YAML doesn't throw an exception.
Do not use this state if your MySQL instance has a database in use called
If you do, it will be irrevocably removed!
Remove the database called
test, normally created as part of a default
MySQL installation. This state is not included as part of the meta-state
above as this name may conflict with a real database.
Install the MySQL development libraries and header files.
Note that this state is not installed by the mysql meta-state unless you set your pillar data accordingly.