npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mysql-action

v1.0.0

Published

MySQL Github Action

Downloads

2

Readme

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.