All Projects → mirromutth → mysql-action

mirromutth / mysql-action

Licence: MIT license
GitHub Action to setup a MySQL database

Programming Languages

typescript
32286 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to mysql-action

gatsby-cli-github-action
GitHub Action wrapping the Gatsby CLI
Stars: ✭ 47 (-55.24%)
Mutual labels:  github-actions
k8s-create-secret
GitHub Action to create Kubernetes cluster secrets
Stars: ✭ 24 (-77.14%)
Mutual labels:  github-actions
verify-changed-files
Github action to verify file changes that occur during the workflow execution.
Stars: ✭ 62 (-40.95%)
Mutual labels:  github-actions
issue-bot
GitHub Actions powered Issue Bot 🦾
Stars: ✭ 62 (-40.95%)
Mutual labels:  github-actions
googlejavaformat-action
GitHub Action that formats Java files following Google Style guidelines
Stars: ✭ 66 (-37.14%)
Mutual labels:  github-actions
setup-action
▶️ GitHub Action using Coursier to install JVM and Scala tools
Stars: ✭ 30 (-71.43%)
Mutual labels:  github-actions
DenverCoder1
Jonah Lawrence's Profile README
Stars: ✭ 320 (+204.76%)
Mutual labels:  github-actions
check-spelling
Spelling checker action
Stars: ✭ 139 (+32.38%)
Mutual labels:  github-actions
postcss-prefixwrap
A PostCSS plugin that is used to wrap css styles with a css selector to constrain their affect on parent elements in a page.
Stars: ✭ 54 (-48.57%)
Mutual labels:  github-actions
shell-linter
A Github Action for ShellCheck
Stars: ✭ 58 (-44.76%)
Mutual labels:  github-actions
anonymization-api
How to build and deploy an anonymization API with FastAPI
Stars: ✭ 51 (-51.43%)
Mutual labels:  github-actions
criterion-compare-action
⚡️📊 Compare the performance of Rust project branches
Stars: ✭ 37 (-64.76%)
Mutual labels:  github-actions
setup-unity
GitHub Action to download and install Unity on Ubuntu, macOS or Windows. Based on Unity Hub
Stars: ✭ 26 (-75.24%)
Mutual labels:  github-actions
aws-security-group-add-ip-action
GitHub Action for AWS Security Group Add IP
Stars: ✭ 32 (-69.52%)
Mutual labels:  github-actions
starter-reactnative-nestjs-mysql
Starter mobile ReactNative NestJS MySQL with continuous integration and AWS deployment
Stars: ✭ 16 (-84.76%)
Mutual labels:  github-actions
clojure-dependency-update-action
A simple GitHub Actions job to create Pull Requests for outdated dependencies in clojure projects
Stars: ✭ 37 (-64.76%)
Mutual labels:  github-actions
HelloActions-Qt
Qt use github-actions(Qt项目使用github的持续集成)
Stars: ✭ 103 (-1.9%)
Mutual labels:  github-actions
github-action
CLA Assistant GitHub Action
Stars: ✭ 165 (+57.14%)
Mutual labels:  github-actions
git-tag-action
[GitHub Action] Get ${version} from package.json and git tag ${version} for the repository.
Stars: ✭ 26 (-75.24%)
Mutual labels:  github-actions
add-an-issue-reference-action
A GitHub Action for adding a related issue reference to a pull request.
Stars: ✭ 19 (-81.9%)
Mutual labels:  github-actions

MySQL GitHub Action Test status

This GitHub Action sets up a MySQL database in Docker.

It supports various MySQL options to accurately configure and execute MySQL. So it may not be your best choice when you just want to run a simple MySQL, see The Default MySQL.

It is based on the Docker container and is limited by Github Actions, which contains only Linux now. Therefore it does not work in Mac OS and Windows environment.

Usage

steps:
- uses: mirromutth/[email protected]
  with:
    host port: 3800 # Optional, default value is 3306. The port of host
    container port: 3307 # Optional, default value is 3306. The port of container
    character set server: 'utf8' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld
    collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
    mysql version: '8.0' # Optional, default value is "latest". The version of the MySQL
    mysql database: 'some_test' # Optional, default value is "test". The specified database which will be create
    mysql root password: ${{ secrets.RootPassword }} # Required if "mysql user" is empty, default is empty. The root superuser password
    mysql user: 'developer' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
    mysql password: ${{ secrets.DatabasePassword }} # Required if "mysql user" exists. The password for the "mysql user"

If want bind MySQL host port to 3306, please see The Default MySQL.

See Docker Hub for available MySQL versions.

See Creating and using secrets (encrypted variables) for hiding database password.

The Default MySQL

MySQL may be installed and started by Github Actions (aka. the Default MySQL), that version is 5.7 generally, root superuser password is "root" and port is 3306. See Software in virtual environments for GitHub Actions.

So before set-up a MySQL which host port is 3306 in Docker, please make sure the Default MySQL has been shutted-down. Otherwise, action will fail and print an error log that looks like: Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use. (See #2)

Sure, if you do not care about MySQL options, such as version, bound port, character set, character collation, root password, etc., you can use the Default MySQL instead of this Action.

Shutdown the Default MySQL

jobs:
  build:
    runs-on: ubuntu-${{ ubuntu-version }} # is Ubuntu environment

    # ... some other config ...

    steps:
    - # ... some prepare steps, like action/checkout, run some script without MySQL, etc.

    - name: Shutdown Ubuntu MySQL (SUDO)
      run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it

    - # ... some steps before set-up MySQL ...
    - name: Set up MySQL
      uses: mirromutth/[email protected]
      with:
        # ... Set-up MySQL configuration, see Usage

    - # ... some steps after set-up MySQL ...

    # ... some another config ...

License

This project is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].