{"id":16932571,"url":"https://github.com/shogo82148/actions-setup-mysql","last_synced_at":"2026-03-14T16:59:39.182Z","repository":{"id":36984297,"uuid":"306339666","full_name":"shogo82148/actions-setup-mysql","owner":"shogo82148","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-09T00:33:02.000Z","size":6028,"stargazers_count":54,"open_issues_count":11,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-14T12:10:42.193Z","etag":null,"topics":["database","github-actions","mysql"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shogo82148.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["shogo82148"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-10-22T13:05:01.000Z","updated_at":"2024-09-30T06:10:36.000Z","dependencies_parsed_at":"2023-01-17T11:32:41.076Z","dependency_job_id":"8c18aabd-4c4c-458e-bd9d-4bd9bd617cb4","html_url":"https://github.com/shogo82148/actions-setup-mysql","commit_stats":{"total_commits":794,"total_committers":3,"mean_commits":264.6666666666667,"dds":0.1926952141057935,"last_synced_commit":"b9fb984492149a15cbec00cd114afabfc7ce7cdb"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shogo82148%2Factions-setup-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shogo82148%2Factions-setup-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shogo82148%2Factions-setup-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shogo82148%2Factions-setup-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shogo82148","download_url":"https://codeload.github.com/shogo82148/actions-setup-mysql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974717,"owners_count":21026742,"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":["database","github-actions","mysql"],"created_at":"2024-10-13T20:46:57.759Z","updated_at":"2026-03-14T16:59:39.138Z","avatar_url":"https://github.com/shogo82148.png","language":"TypeScript","funding_links":["https://github.com/sponsors/shogo82148"],"categories":["TypeScript"],"sub_categories":[],"readme":"# actions-setup-mysql\n\nThis action sets up a MySQL database for use in actions by:\n\n- download a version of MySQL or MariaDB\n- start mysqld\n\n## Motivation\n\n- GitHub-Hosted Runners have MySQL Server, but only Linux.\n- GitHub Actions supports Docker services, and there is the official [MySQL image](https://hub.docker.com/_/mysql). But it works on only Linux.\n- Some utils for MySQL (such as [MySQL::Partition](https://metacpan.org/pod/MySQL::Partition), [App::Prove::Plugin::MySQLPool](https://metacpan.org/pod/App::Prove::Plugin::MySQLPool), [Test::mysqld](https://metacpan.org/pod/Test::mysqld)) requires MySQL installed on the local host.\n\n## Usage\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - uses: shogo82148/actions-setup-mysql@v1\n    with:\n      mysql-version: \"8.0\"\n  - run: mysql -uroot -e 'SELECT version()'\n```\n\n## Configuration\n\n### `mysql-version`\n\nThe version of MySQL or MariaDB.\n\nAvailable Versions are:\n\n- MySQL\n  - `9.0`\n  - `8.4`\n  - `8.3`\n  - `8.2`\n  - `8.1`\n  - `8.0`\n  - `5.7`\n  - `5.6`\n- MariaDB\n  - `11.7`\n  - `11.6`\n  - `11.5`\n  - `11.4`\n  - `11.3`\n  - `11.2`\n  - `11.1`\n  - `11.0`\n  - `10.11`\n  - `10.10`\n  - `10.9`\n  - `10.8`\n  - `10.7`\n  - `10.6`\n  - `10.5`\n  - `10.4`\n  - `10.3`\n  - `10.2`\n\n### `distribution`\n\nThe distribution. The valid values are `mysql` or `mariadb`.\nThe default value is `mysql`.\n\nYou can use `mysql-` and `mariadb-` prefixes in `mysql-version` instead of the `distribution` input.\nFor example, the following two workflows install MariaDB 10.6.\n\n```yaml\n- uses: shogo82148/actions-setup-mysql@v1\n  with:\n    distribution: \"mariadb\"\n    mysql-version: \"10.6\"\n```\n\n```yaml\n- uses: shogo82148/actions-setup-mysql@v1\n  with:\n    mysql-version: \"mariadb-10.6\"\n```\n\n### `auto-start`\n\nIf it is `true`, the action starts the MySQL server.\nIf it is `false`, the action doesn't start the MySQL sever.\nYou need to execute the `mysqld` command yourself.\n\nThe default value is `true`.\n\n### `my-cnf`\n\n`my.cnf` settings for mysqld.\nIt uses the same syntax as `my.cnf`.\n\nExample:\n\n```yaml\n- uses: shogo82148/actions-setup-mysql@v1\n  with:\n    mysql-version: \"8.0\"\n    my-cnf: |\n      innodb_log_file_size=256MB\n      innodb_buffer_pool_size=512MB\n      max_allowed_packet=16MB\n      max_connections=50\n      local_infile=1\n```\n\n### `root-password`\n\nThe password for the root user.\n\n### `user`\n\nThe name of the new user.\n\n### `password`\n\nThe password for the new user.\n\n## Outputs\n\n### `base-dir`\n\nThe directory under which the mysql database is being created.\n\nIt contains:\n\n- `etc/my.cnf`\n- `tmp/mysqld.log`\n- `tmp/mysqld.pid`\n- `tmp/mysql.sock`\n- `var`: The default path of `datadir`\n- `var/ca.pem`: The root certificate of the certification authority for SSL/TLS\n- `var/server-cert.pem`: The server certificate for SSL/TLS\n- `var/server-key.pem`: The server key for SSL/TLS\n\nHere are some examples:\n\n```yaml\n- id: setup-mysql\n  uses: shogo82148/actions-setup-mysql@v1\n  with:\n    mysql-version: \"8.0\"\n\n- name: connect via unix domain socket\n  run: mysql -uroot \\\n    --protocol=SOCKET \\\n    --socket=${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock\n    -e 'SELECT version()'\n\n- name: configure the root certificate for connecting via SSL/TLS.\n  run: mysql -uroot \\\n    --ssl --ssl-mode=REQUIRED \\\n    --ssl-ca=${{ steps.setup-mysql.outputs.base-dir }}/var/ca.pem \\\n    -e 'SELECT version()'\n```\n\n## Environment Values\n\n### `MYSQL_HOME`\n\nThe path to the directory in which the server-specific my.cnf file resides.\n\n### `LIBMYSQL_PLUGIN_DIR`\n\nDirectory in which to look for client plugins.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshogo82148%2Factions-setup-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshogo82148%2Factions-setup-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshogo82148%2Factions-setup-mysql/lists"}