{"id":19871892,"url":"https://github.com/saltstack-formulas/mysql-formula","last_synced_at":"2025-05-15T15:07:29.222Z","repository":{"id":1123500,"uuid":"10653394","full_name":"saltstack-formulas/mysql-formula","owner":"saltstack-formulas","description":"Install the MySQL client and/or server","archived":false,"fork":false,"pushed_at":"2025-04-07T20:01:55.000Z","size":629,"stargazers_count":85,"open_issues_count":40,"forks_count":366,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-04-07T21:09:55.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html","language":"SaltStack","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltstack-formulas.png","metadata":{"files":{"readme":"docs/README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-06-12T22:05:35.000Z","updated_at":"2024-08-10T03:39:32.000Z","dependencies_parsed_at":"2024-12-08T07:03:28.030Z","dependency_job_id":"58334fc6-5b0c-4238-a9a6-14eefbbfbe98","html_url":"https://github.com/saltstack-formulas/mysql-formula","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fmysql-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fmysql-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fmysql-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fmysql-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltstack-formulas","download_url":"https://codeload.github.com/saltstack-formulas/mysql-formula/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T16:13:56.073Z","updated_at":"2025-05-15T15:07:24.201Z","avatar_url":"https://github.com/saltstack-formulas.png","language":"SaltStack","funding_links":[],"categories":[],"sub_categories":[],"readme":"mysql-formula\n=============\n\n|img_travis| |img_sr|\n\n.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/mysql-formula.svg?branch=master\n   :alt: Travis CI Build Status\n   :scale: 100%\n   :target: https://travis-ci.com/saltstack-formulas/mysql-formula\n.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n   :alt: Semantic Release\n   :scale: 100%\n   :target: https://github.com/semantic-release/semantic-release\n\nInstall the MySQL client and/or server on Linux and MacOS.\n\n.. contents:: **Table of Contents**\n\nGeneral notes\n-------------\n\nSee the full `SaltStack Formulas installation and usage instructions\n\u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html\u003e`_.\n\nIf you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section\n\u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas\u003e`_.\n\nIf you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,\nwhich contains the currently released version. This formula is versioned according to `Semantic Versioning \u003chttp://semver.org/\u003e`_.\n\nSee `Formula Versioning Section \u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning\u003e`_ for more details.\n\nContributing to this repo\n-------------------------\n\n**Commit message formatting is significant!!**\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\nAvailable states\n----------------\n\n.. contents::\n    :local:\n\n``mysql``\n^^^^^^^^^\n\nMeta-state including all server packages in correct order. This meta-state does **not** include ``mysql.remove_test_database``.\n\n``mysql.macos``\n^^^^^^^^^^^^^^^\n\nInstall \"MySQL Community Server\", \"MySQL Workbench\", and other related mysql products on MacOS (and create Desktop shortcuts).\n\n``mysql.macos.remove``\n^^^^^^^^^^^^^^^^^^^^^^\n\nRemove \"MySQL Community Server\", \"MySQL Workbench\", and any other enabled products from MacOS.\n\n``mysql.client``\n^^^^^^^^^^^^^^^^\n\nInstall the MySQL client package on Linux.\n\n``mysql.server``\n^^^^^^^^^^^^^^^^\n\nInstall the MySQL server package and start the service.\n\nDebian OS family supports setting MySQL root password during install via debconf.\n\n.. note::\n\n    If no root password is provided in the pillar, a random one will\n    be created. Because Hydrogen doesn't have easy access to a random\n    function (test.rand_str isn't introduced until Helium), instead,\n    we use the not-at-all random ``grains.server_id``. As this is\n    cryptographically insecure, future formula versions should use the\n    newly available ``random.get_str`` method.\n\n``mysql.server_checks``\n^^^^^^^^^^^^^^^^^^^^^^^\n\nEnforces a root password to be set.\n\n\n``mysql.disabled``\n^^^^^^^^^^^^^^^^^^\n\nEnsure that the MySQL service is not running.\n\n``mysql.database``\n^^^^^^^^^^^^^^^^^^\n\nCreate and manage MySQL databases.\n\n``mysql.python``\n^^^^^^^^^^^^^^^^\n\nInstall mysql python bindings.\n\n``mysql.user``\n^^^^^^^^^^^^^^\n\nCreate and manage MySQL database users with definable GRANT privileges.\n\nThe state accepts MySQL hashed passwords or clear text. Hashed password have\npriority.\n\n.. note::\n    See the `salt.states.mysql_user\n    \u003chttp://docs.saltstack.com/en/latest/ref/states/all/salt.states.mysql_user.html#module-salt.states.mysql_user\u003e`_\n    docs for additional information on configuring hashed passwords.\n\n    Make sure to **quote the passwords** in the pillar so YAML doesn't throw an exception.\n\n``mysql.remove_test_database``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. warning::\n\n   Do not use this state if your MySQL instance has a database in use called ``test``.\n   If you do, it will be irrevocably removed!\n\nRemove the database called ``test``, normally created as part of a default\nMySQL installation.  This state is **not** included as part of the meta-state\nabove as this name may conflict with a real database.\n\n``mysql.dev``\n^^^^^^^^^^^^^\n\nInstall the MySQL development libraries and header files.\n\n.. note::\n    Note that this state is not installed by the mysql meta-state unless you set\n    your pillar data accordingly.\n\n``mysql.repo``\n^^^^^^^^^^^^^^\n\nAdd the official MySQL 5.7 repository.\n\n.. note::\n    Note that this state currently only supports MySQL 5.7 for RHEL systems.\n    Debian and Suse support to be added. Also need to add the option to allow\n    selection of MySQL version (5.6 and 5.5 repos are added but disabled) and\n    changed enabled repository accordingly.\n\n``mysql.config``\n^^^^^^^^^^^^^^^^\n\nManage the MySQL configuration.\n\n.. note::\n    There are currently two common ways to configure MySQL, a monolithic configuration file\n    or a configuration directory with configuration files per component. By default this\n    state will use a configuration directory for CentOS and Fedora, and a monolithic\n    configuration file for all other supported OSes.\n\n    Whether the configuration directory is used or not depends on whether `mysql.config_directory`\n    is defined in the pillar. If it is present it will pick the configuration from individual\n    component keys (`mysql.server`, `mysql.galera`, `mysql.libraries`, etc) with optional global\n    configuration from `mysql.global`. The monolithic configuration, however, is defined separately\n    in `mysql.config`.\n\n\nTesting\n-------\n\nLinux testing is done with ``kitchen-salt``.\n\nRequirements\n^^^^^^^^^^^^\n\n* Ruby\n* Docker\n\n.. code-block:: bash\n\n   $ gem install bundler\n   $ bundle install\n   $ bin/kitchen test [platform]\n\nWhere ``[platform]`` is the platform name defined in ``kitchen.yml``,\ne.g. ``debian-9-2019-2-py3``.\n\n``bin/kitchen converge``\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nCreates the docker instance and runs the ``mysql`` main state, ready for testing.\n\n``bin/kitchen verify``\n^^^^^^^^^^^^^^^^^^^^^^\n\nRuns the ``inspec`` tests on the actual instance.\n\n``bin/kitchen destroy``\n^^^^^^^^^^^^^^^^^^^^^^^\n\nRemoves the docker instance.\n\n``bin/kitchen test``\n^^^^^^^^^^^^^^^^^^^^\n\nRuns all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.\n\n``bin/kitchen login``\n^^^^^^^^^^^^^^^^^^^^^\n\nGives you SSH access to the instance for manual testing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Fmysql-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltstack-formulas%2Fmysql-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Fmysql-formula/lists"}