This fixes https://github.com/saltstack-formulas/mysql-formula/issues/157
* Avoid failures on first run with a salt_user defined
Add a dependency on sls: mysql.salt-user to ensure MySQL users
(especially the salt_user) get created early enough - without that,
parts of the first run will fail (but a second run works).
mysql.server formula failed on gentoo because of hard-coded pid-file (pid_file is not detected as declared for gentoo defaults.yaml because the variable name for the pid-file is hard-coded in the init.d script installed by standard dev-db/mysql ebuild as pid-file (not pid_file)).
mysql.server formula also failed because it was missing the step. This commit adds this as an alternative mysql_initialize step for the gentoo os_family.
Some distros set the environment variable for the temp directory to
/tmp/$USER which is owned by $USER mode 700. This prevents the
mysql user from being able to access the temporary files it needs.
the config file update depends on the parent directory /etc/mysql being present, which is created as part of the mysql-server package installation. therefore, the mysqld state is split up for debian environments into the package installation and the mysqld configuration. this allows to set the pkg installation as a requirement for the config file management and to set the config file management as a requirement for the mysqld service management
In some MySQL server configurations (e.g., Amazon RDS), the root account
may not be available. Instead, one may need to use a different account
in order to perform database administration. This change replaced hard-
coded references to the root account with a Pillar lookup that defaults
to 'root'. Existing users of this formula should see no change in its
behavior.
debconf.set which is used in mysql.server has a dependency on debconf-utils. If
it is not installed the password will not be set and is cumbersome to change
later on.
Add support of changing/adding any attribute in my.cnf. NB!!! It breaks backward compatibility for mysql.server state.
Delete mysql_size param support (now you can customiza all my.cnf parameters in pillar)
Add script import_users.py that create user pillar for existent server
Add support root@localhost mysql user without password (root_password = False)
Add support of grant_option